diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:04:59 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:04:59 +0200 |
commit | f570e2f2685aa43aa518c2f8578391c1847cddbe (patch) | |
tree | b9376b3a7e807c5e0c4cf3d5615c14034d9675d6 /ui/batchStatusHandler.cpp | |
parent | 3.2 (diff) | |
download | FreeFileSync-f570e2f2685aa43aa518c2f8578391c1847cddbe.tar.gz FreeFileSync-f570e2f2685aa43aa518c2f8578391c1847cddbe.tar.bz2 FreeFileSync-f570e2f2685aa43aa518c2f8578391c1847cddbe.zip |
3.3
Diffstat (limited to 'ui/batchStatusHandler.cpp')
-rw-r--r-- | ui/batchStatusHandler.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/ui/batchStatusHandler.cpp b/ui/batchStatusHandler.cpp index 43e818ee..793f18fd 100644 --- a/ui/batchStatusHandler.cpp +++ b/ui/batchStatusHandler.cpp @@ -63,14 +63,18 @@ private: using namespace globalFunctions; //create logfile directory - const wxString logfileDir = logfileDirectory.empty() ? FreeFileSync::getDefaultLogDirectory() : logfileDirectory; - if (!FreeFileSync::dirExists(wxToZ(logfileDir))) - FreeFileSync::createDirectory(wxToZ(logfileDir)); //create recursively if necessary: may throw (FileError&) + Zstring logfileDir = logfileDirectory.empty() ? + wxToZ(FreeFileSync::getDefaultLogDirectory()) : + FreeFileSync::getFormattedDirectoryName(wxToZ(logfileDirectory)); + + if (!FreeFileSync::dirExists(logfileDir)) + FreeFileSync::createDirectory(logfileDir); //create recursively if necessary: may throw (FileError&) //assemble logfile name - wxString logfileName = logfileDir; - if (!logfileName.empty() && logfileName.Last() != FILE_NAME_SEPARATOR) - logfileName += FILE_NAME_SEPARATOR; + if (!logfileDir.EndsWith(FILE_NAME_SEPARATOR)) + logfileDir += FILE_NAME_SEPARATOR; + + wxString logfileName = zToWx(logfileDir); wxString timeNow = wxDateTime::Now().FormatISOTime(); timeNow.Replace(wxT(":"), wxT("-")); |