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
This commit is contained in:
Olivier Goffart 2014-04-22 14:15:43 +02:00
parent 44a04227f1
commit ee22f377af

View file

@ -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;
}