summaryrefslogtreecommitdiff
path: root/Application.cpp
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:13:35 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:13:35 +0200
commit801e8b43b13f1cb67d9e9ba4aae5acb274ccdfbc (patch)
tree473f4a9ea5016f146fb2ff6085807bc91a84c84e /Application.cpp
parent3.20 (diff)
downloadFreeFileSync-801e8b43b13f1cb67d9e9ba4aae5acb274ccdfbc.tar.gz
FreeFileSync-801e8b43b13f1cb67d9e9ba4aae5acb274ccdfbc.tar.bz2
FreeFileSync-801e8b43b13f1cb67d9e9ba4aae5acb274ccdfbc.zip
3.21
Diffstat (limited to 'Application.cpp')
-rw-r--r--Application.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/Application.cpp b/Application.cpp
index dcd125bc..48bd1155 100644
--- a/Application.cpp
+++ b/Application.cpp
@@ -252,11 +252,12 @@ void Application::runBatchMode(const wxString& filename, xmlAccess::XmlGlobalSet
//batch mode: place directory locks on directories during both comparison AND synchronization
LockHolder dummy;
- for (std::vector<FolderPairCfg>::const_iterator i = cmpConfig.begin(); i != cmpConfig.end(); ++i)
+ std::for_each(cmpConfig.begin(), cmpConfig.end(),
+ [&](const FolderPairCfg& fpCfg)
{
- dummy.addDir(i->leftDirectoryFmt, statusHandler);
- dummy.addDir(i->rightDirectoryFmt, statusHandler);
- }
+ dummy.addDir(fpCfg.leftDirectoryFmt, statusHandler);
+ dummy.addDir(fpCfg.rightDirectoryFmt, statusHandler);
+ });
//COMPARE DIRECTORIES
zen::CompareProcess comparison(globSettings.fileTimeTolerance,
@@ -274,6 +275,7 @@ void Application::runBatchMode(const wxString& filename, xmlAccess::XmlGlobalSet
globSettings.verifyFileCopy,
globSettings.copyLockedFiles,
globSettings.copyFilePermissions,
+ globSettings.transactionalFileCopy,
statusHandler);
const std::vector<zen::FolderPairSyncCfg> syncProcessCfg = zen::extractSyncCfg(batchCfg.mainCfg);
@@ -285,7 +287,7 @@ void Application::runBatchMode(const wxString& filename, xmlAccess::XmlGlobalSet
if (!batchCfg.silent)
{
const wxString soundFile = zen::getResourceDir() + wxT("Sync_Complete.wav");
- if (fileExists(toZ(soundFile)))
+ if (zen::fileExists(zen::toZ(soundFile)))
wxSound::Play(soundFile, wxSOUND_ASYNC); //warning: this may fail and show a wxWidgets error message! => must not play when running FFS as a service!
}
}
bgstack15