diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:01:29 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:01:29 +0200 |
commit | 9a2a524f1e311853d08050be2dcdddc09ac7759a (patch) | |
tree | d8e4a24169fce88c2d89931d58514889a0bcb0ea /shared/standardPaths.cpp | |
parent | 2.3 (diff) | |
download | FreeFileSync-9a2a524f1e311853d08050be2dcdddc09ac7759a.tar.gz FreeFileSync-9a2a524f1e311853d08050be2dcdddc09ac7759a.tar.bz2 FreeFileSync-9a2a524f1e311853d08050be2dcdddc09ac7759a.zip |
3.0
Diffstat (limited to 'shared/standardPaths.cpp')
-rw-r--r-- | shared/standardPaths.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/shared/standardPaths.cpp b/shared/standardPaths.cpp index 54774673..3d5cfdb5 100644 --- a/shared/standardPaths.cpp +++ b/shared/standardPaths.cpp @@ -2,20 +2,23 @@ #include <wx/stdpaths.h> #include <wx/filename.h> #include "systemConstants.h" +#include "stringConv.h" + +using namespace FreeFileSync; wxString assembleFileForUserData(const wxString fileName) { - static const bool isPortableVersion = !wxFileExists(FreeFileSync::getInstallationDir() + globalFunctions::FILE_NAME_SEPARATOR + wxT("uninstall.exe")); //this check is a bit lame... + static const bool isPortableVersion = !wxFileExists(FreeFileSync::getInstallationDir() + zToWx(globalFunctions::FILE_NAME_SEPARATOR) + wxT("uninstall.exe")); //this check is a bit lame... if (isPortableVersion) //use current working directory - return wxString(wxT(".")) + globalFunctions::FILE_NAME_SEPARATOR + fileName; + return wxString(wxT(".")) + zToWx(globalFunctions::FILE_NAME_SEPARATOR) + fileName; else //usen OS' standard paths { wxString userDirectory = wxStandardPathsBase::Get().GetUserDataDir(); - if (!userDirectory.EndsWith(wxString(globalFunctions::FILE_NAME_SEPARATOR))) - userDirectory += globalFunctions::FILE_NAME_SEPARATOR; + if (!userDirectory.EndsWith(zToWx(globalFunctions::FILE_NAME_SEPARATOR))) + userDirectory += zToWx(globalFunctions::FILE_NAME_SEPARATOR); if (!wxDirExists(userDirectory)) ::wxMkdir(userDirectory); //only top directory needs to be created: no recursion necessary |