diff options
author | Chris Wilson <chris+github@qwirx.com> | 2007-11-04 15:57:29 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2007-11-04 15:57:29 +0000 |
commit | a7c1c05da41829419060ea3e60c0fa4f95dc4e67 (patch) | |
tree | 6263a8f1cb5bcaa03a99f228776efe331812f039 /lib/backupclient/BackupClientRestore.cpp | |
parent | 6fa1bbc2526ead251f51d1487fc17971a81105ac (diff) |
unlink returns 0 on success, not on error.
Diffstat (limited to 'lib/backupclient/BackupClientRestore.cpp')
-rw-r--r-- | lib/backupclient/BackupClientRestore.cpp | 2 |
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 << "': " << |