AccountSettings: When adding a new folder, set ignore hidden flag.

The value is taken from existing folder definitions, or defaults to true.
This commit is contained in:
Klaas Freitag 2015-07-15 14:51:37 +02:00
parent cfe5150037
commit a5528b7cd4

View File

@ -192,6 +192,17 @@ void AccountSettings::slotFolderWizardAccepted()
definition.alias = folderWizard->field(QLatin1String("alias")).toString();
definition.localPath = folderWizard->field(QLatin1String("sourceFolder")).toString();
definition.targetPath = folderWizard->property("targetPath").toString();
bool ignoreHidden = true;
/* take the value from the definition of already existing folders. All folders have
* the same setting so far, that's why it's ok to check the first one.
* The default is to not sync hidden files
*/
if( folderMan->map().count() > 0) {
ignoreHidden = folderMan->map().first()->ignoreHiddenFiles();
}
definition.ignoreHiddenFiles = ignoreHidden;
auto selectiveSyncBlackList = folderWizard->property("selectiveSyncBlackList").toStringList();
folderMan->setSyncEnabled(true);