diff options
author | B Stack <bgstack15@gmail.com> | 2019-06-14 22:33:49 -0400 |
---|---|---|
committer | B Stack <bgstack15@gmail.com> | 2019-06-14 22:33:49 -0400 |
commit | 583d22efb5901296d1e3dcbc091be5dee9d8a14f (patch) | |
tree | cc720d69d3ca68b64ed0aa79438177b6953469a1 /zen/file_access.cpp | |
parent | Merge branch '10.12' into 'master' (diff) | |
download | FreeFileSync-583d22efb5901296d1e3dcbc091be5dee9d8a14f.tar.gz FreeFileSync-583d22efb5901296d1e3dcbc091be5dee9d8a14f.tar.bz2 FreeFileSync-583d22efb5901296d1e3dcbc091be5dee9d8a14f.zip |
10.13
Diffstat (limited to 'zen/file_access.cpp')
-rw-r--r-- | zen/file_access.cpp | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/zen/file_access.cpp b/zen/file_access.cpp index 8ac9eb3b..483d4b01 100644 --- a/zen/file_access.cpp +++ b/zen/file_access.cpp @@ -360,25 +360,6 @@ void zen::moveAndRenameItem(const Zstring& pathFrom, const Zstring& pathTo, bool } catch (ErrorTargetExisting&) { -#if 0 //"Work around pen drive failing to change file name case" => enable if needed: https://freefilesync.org/forum/viewtopic.php?t=4279 - const Zstring fileNameSrc = afterLast (pathFrom, FILE_NAME_SEPARATOR, IF_MISSING_RETURN_ALL); - const Zstring fileNameTrg = afterLast (pathTo, FILE_NAME_SEPARATOR, IF_MISSING_RETURN_ALL); - const Zstring parentPathSrc = beforeLast(pathFrom, FILE_NAME_SEPARATOR, IF_MISSING_RETURN_NONE); - const Zstring parentPathTrg = beforeLast(pathTo, FILE_NAME_SEPARATOR, IF_MISSING_RETURN_NONE); - //some (broken) devices may fail to rename case directly: - if (equalNativePath(parentPathSrc, parentPathTrg)) - { - if (fileNameSrc == fileNameTrg) - return; //non-sensical request - - const Zstring tempFilePath = getTemporaryPath8Dot3(pathFrom); //throw FileError - moveAndRenameFileSub(pathFrom, tempFilePath); //throw FileError, (ErrorMoveUnsupported), ErrorTargetExisting - ZEN_ON_SCOPE_FAIL(moveAndRenameFileSub(tempFilePath, pathFrom)); //"try" our best to be "atomic" :> - moveAndRenameFileSub(tempFilePath, pathTo); //throw FileError, (ErrorMoveUnsupported), ErrorTargetExisting - return; - } -#endif - throw; } } |