diff options
author | Klaas Freitag <freitag@owncloud.com> | 2014-03-10 15:22:06 +0400 |
---|---|---|
committer | Klaas Freitag <freitag@owncloud.com> | 2014-03-10 15:22:06 +0400 |
commit | c8a8eb35fab8359ab0f3e0aa37955a589f710399 (patch) | |
tree | 1aa5eccd882d9e547badd2afdede556173cf6035 | |
parent | 2656cc70d113805f50b179ba07c049a540a47ad7 (diff) |
Disable the folder if it is going to be removed.v1.5.3
-rw-r--r-- | src/mirall/folderman.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/mirall/folderman.cpp b/src/mirall/folderman.cpp index ea4e258c4..29dafdfcc 100644 --- a/src/mirall/folderman.cpp +++ b/src/mirall/folderman.cpp @@ -537,14 +537,17 @@ void FolderMan::removeFolder( const QString& alias ) if( _folderMap.contains( alias )) { qDebug() << "Removing " << alias; f = _folderMap.take( alias ); - if(f) { - f->wipe(); - } } else { qDebug() << "!! Can not remove " << alias << ", not in folderMap."; } if( f ) { + f->wipe(); + + // can be removed if we are able to delete the folder object. + f->setSyncEnabled(false); + + // remove the folder configuration QFile file( _folderConfigPath + QLatin1Char('/') + f->configFile() ); if( file.exists() ) { qDebug() << "Remove folder config file " << file.fileName(); |