summaryrefslogtreecommitdiff
path: root/lib/backupclient/BackupClientRestore.cpp
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2007-11-04 15:57:29 +0000
committerChris Wilson <chris+github@qwirx.com>2007-11-04 15:57:29 +0000
commita7c1c05da41829419060ea3e60c0fa4f95dc4e67 (patch)
tree6263a8f1cb5bcaa03a99f228776efe331812f039 /lib/backupclient/BackupClientRestore.cpp
parent6fa1bbc2526ead251f51d1487fc17971a81105ac (diff)
unlink returns 0 on success, not on error.
Diffstat (limited to 'lib/backupclient/BackupClientRestore.cpp')
-rw-r--r--lib/backupclient/BackupClientRestore.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/backupclient/BackupClientRestore.cpp b/lib/backupclient/BackupClientRestore.cpp
index 3c03c87c..58234562 100644
--- a/lib/backupclient/BackupClientRestore.cpp
+++ b/lib/backupclient/BackupClientRestore.cpp
@@ -454,7 +454,7 @@ static int BackupClientRestoreDir(BackupProtocolClient &rConnection, int64_t Dir
std::string localFilename(rLocalDirectoryName + DIRECTORY_SEPARATOR_ASCHAR + nm.GetClearFilename());
// Unlink anything which already exists -- for resuming restores, we can't overwrite files already there.
- if(::unlink(localFilename.c_str()) == 0)
+ if(::unlink(localFilename.c_str()) != 0)
{
BOX_ERROR("Failed to delete file '" <<
localFilename << "': " <<