diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:26:50 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:26:50 +0200 |
commit | 669df123648aaa6aeccc70206b5417bc48b4e9ae (patch) | |
tree | 463c107a8d6405020bb304f7a7253e6b64afeee0 /lib/versioning.cpp | |
parent | 5.18 (diff) | |
download | FreeFileSync-669df123648aaa6aeccc70206b5417bc48b4e9ae.tar.gz FreeFileSync-669df123648aaa6aeccc70206b5417bc48b4e9ae.tar.bz2 FreeFileSync-669df123648aaa6aeccc70206b5417bc48b4e9ae.zip |
5.19
Diffstat (limited to 'lib/versioning.cpp')
-rw-r--r-- | lib/versioning.cpp | 7 |
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 |