From ee22f377afed4dea25b656d03374be697be4fb56 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Tue, 22 Apr 2014 14:15:43 +0200 Subject: [PATCH] Start the folder watcher when new folder are added Before, we would only set up a file system watcher when we read the config at startup. But we also need to do it in the other case when the user configure new folder to watch --- src/mirall/folderman.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mirall/folderman.cpp b/src/mirall/folderman.cpp index c4a5a2e477..fa9ba13776 100644 --- a/src/mirall/folderman.cpp +++ b/src/mirall/folderman.cpp @@ -149,7 +149,6 @@ int FolderMan::setupFolders() foreach ( const QString& alias, list ) { Folder *f = setupFolderFromConfigFile( alias ); if( f ) { - registerFolderMonitor(f); slotScheduleSync(alias); emit( folderSyncStateChange( f->alias() ) ); } @@ -307,6 +306,8 @@ Folder* FolderMan::setupFolderFromConfigFile(const QString &file) { connect(folder, SIGNAL(syncFinished(SyncResult)), SLOT(slotFolderSyncFinished(SyncResult))); _folderChangeSignalMapper->setMapping( folder, folder->alias() ); + + registerFolderMonitor(folder); return folder; }