summaryrefslogtreecommitdiff
path: root/zen/file_access.cpp
diff options
context:
space:
mode:
authorB Stack <bgstack15@gmail.com>2019-07-10 20:36:59 +0000
committerB Stack <bgstack15@gmail.com>2019-07-10 20:36:59 +0000
commitb3eda3ab537804cfa07cc257944b6fc69bec59a8 (patch)
treecc720d69d3ca68b64ed0aa79438177b6953469a1 /zen/file_access.cpp
parentMerge branch '10.12' into 'master' (diff)
parent10.13 (diff)
downloadFreeFileSync-b3eda3ab537804cfa07cc257944b6fc69bec59a8.tar.gz
FreeFileSync-b3eda3ab537804cfa07cc257944b6fc69bec59a8.tar.bz2
FreeFileSync-b3eda3ab537804cfa07cc257944b6fc69bec59a8.zip
Merge branch '10.13' into 'master'10.13
10.13 See merge request opensource-tracking/FreeFileSync!10
Diffstat (limited to 'zen/file_access.cpp')
-rw-r--r--zen/file_access.cpp19
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;
}
}
bgstack15