summaryrefslogtreecommitdiff
path: root/lib/versioning.cpp
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:26:50 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:26:50 +0200
commit669df123648aaa6aeccc70206b5417bc48b4e9ae (patch)
tree463c107a8d6405020bb304f7a7253e6b64afeee0 /lib/versioning.cpp
parent5.18 (diff)
downloadFreeFileSync-669df123648aaa6aeccc70206b5417bc48b4e9ae.tar.gz
FreeFileSync-669df123648aaa6aeccc70206b5417bc48b4e9ae.tar.bz2
FreeFileSync-669df123648aaa6aeccc70206b5417bc48b4e9ae.zip
5.19
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