generally prevent threads to start twice, and fixed bug causing DirWatcher to be run twice

This commit is contained in:
cyril soler 2016-11-07 10:09:28 +01:00
parent eb95c6895a
commit 461975f115
2 changed files with 8 additions and 3 deletions

View file

@ -54,10 +54,10 @@ void LocalDirectoryUpdater::setEnabled(bool b)
if(mIsEnabled == b)
return ;
if(b)
start("fs dir updater") ;
else
if(!b)
shutdown();
else if(!isRunning())
start("fs dir updater") ;
mIsEnabled = b ;
}