diff options
author | B Stack <bgstack15@gmail.com> | 2020-08-31 20:07:13 -0400 |
---|---|---|
committer | B Stack <bgstack15@gmail.com> | 2020-08-31 20:07:13 -0400 |
commit | 8a27fa9c617533e76673ce61a65e2ba869b52208 (patch) | |
tree | acfdfb3e1046db87040477033fda0df76d92916a /FreeFileSync/Source/ffs_paths.cpp | |
parent | Merge branch '11.0' into 'master' (diff) | |
download | FreeFileSync-8a27fa9c617533e76673ce61a65e2ba869b52208.tar.gz FreeFileSync-8a27fa9c617533e76673ce61a65e2ba869b52208.tar.bz2 FreeFileSync-8a27fa9c617533e76673ce61a65e2ba869b52208.zip |
add upstream 11.1
Diffstat (limited to 'FreeFileSync/Source/ffs_paths.cpp')
-rw-r--r-- | FreeFileSync/Source/ffs_paths.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/FreeFileSync/Source/ffs_paths.cpp b/FreeFileSync/Source/ffs_paths.cpp index 843e702e..d62299b2 100644 --- a/FreeFileSync/Source/ffs_paths.cpp +++ b/FreeFileSync/Source/ffs_paths.cpp @@ -8,6 +8,7 @@ #include <zen/file_access.h> #include <zen/thread.h> #include <zen/symlink_target.h> +#include <zen/sys_info.h> #include <wx/stdpaths.h> #include <wx/app.h> @@ -23,7 +24,7 @@ Zstring getProcessParentFolderPath() //note: compiler generates magic-statics code => fine, we don't expect accesses during shutdown => don't need FunStatGlobal<> static const Zstring exeFolderParentPath = [] { - Zstring exeFolderPath = beforeLast(utfTo<Zstring>(wxStandardPaths::Get().GetExecutablePath()), FILE_NAME_SEPARATOR, IF_MISSING_RETURN_NONE); + Zstring exeFolderPath = beforeLast(utfTo<Zstring>(wxStandardPaths::Get().GetExecutablePath()), FILE_NAME_SEPARATOR, IfNotFoundReturn::none); try { //get rid of relative path fragments, e.g.: C:\Data\Projects\FreeFileSync\Source\..\Build\Bin @@ -31,7 +32,7 @@ Zstring getProcessParentFolderPath() } catch (FileError&) { assert(false); } - return beforeLast(exeFolderPath, FILE_NAME_SEPARATOR, IF_MISSING_RETURN_NONE); + return beforeLast(exeFolderPath, FILE_NAME_SEPARATOR, IfNotFoundReturn::none); }(); return exeFolderParentPath; } @@ -50,7 +51,7 @@ std::once_flag onceFlagGetFfsVolumeId; VolumeId fff::getFfsVolumeId() //throw FileError { static VolumeId volumeId; //POD => no "magic static" code gen - std::call_once(onceFlagGetFfsVolumeId, [] { volumeId = getVolumeId(getProcessParentFolderPath()); }); //throw FileError + std::call_once(onceFlagGetFfsVolumeId, [] { volumeId = getVolumeId(getProcessPath()); }); //throw FileError return volumeId; } |