[Box Backup-commit] COMMIT r1919 - box/trunk/lib/backupclient

boxbackup-dev at fluffy.co.uk boxbackup-dev at fluffy.co.uk
Sun Nov 4 15:57:29 GMT 2007


Author: chris
Date: 2007-11-04 15:57:29 +0000 (Sun, 04 Nov 2007)
New Revision: 1919

Modified:
   box/trunk/lib/backupclient/BackupClientRestore.cpp
Log:
unlink returns 0 on success, not on error.


Modified: box/trunk/lib/backupclient/BackupClientRestore.cpp
===================================================================
--- box/trunk/lib/backupclient/BackupClientRestore.cpp	2007-11-04 15:20:09 UTC (rev 1918)
+++ box/trunk/lib/backupclient/BackupClientRestore.cpp	2007-11-04 15:57:29 UTC (rev 1919)
@@ -454,7 +454,7 @@
 				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 << "': " <<




More information about the Boxbackup-commit mailing list