summaryrefslogtreecommitdiff
path: root/lib/versioning.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/versioning.cpp')
-rw-r--r--lib/versioning.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/versioning.cpp b/lib/versioning.cpp
index 1bf5a65e..a6458196 100644
--- a/lib/versioning.cpp
+++ b/lib/versioning.cpp
@@ -129,15 +129,14 @@ void moveObject(const Zstring& sourceFile, //throw FileError
{
assert(!dirExists(sourceFile) || symlinkExists(sourceFile)); //we process files and symlinks only
- auto removeTarget = [&]()
+ auto removeTarget = [&]
{
//remove target object
if (fileExists(targetFile)) //file or symlink
removeFile(targetFile); //throw FileError
else if (dirExists(targetFile)) //directory or symlink
- removeDirectory(targetFile); //throw FileError
- //we do not expect targetFile to be a directory in general => no callback required
- else assert(false);
+ removeDirectory(targetFile); //throw FileError; we do not expect targetFile to be a directory in general => no callback required
+ //else assert(false); -> may simply not exist if ErrorDifferentVolume!
};
//first try to move directly without copying
bgstack15