summaryrefslogtreecommitdiff
path: root/ui/batchStatusHandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ui/batchStatusHandler.cpp')
-rw-r--r--ui/batchStatusHandler.cpp16
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("-"));
bgstack15