[Box Backup-dev] COMMIT r587 - box/chris/general/lib/raidfile

boxbackup-dev at fluffy.co.uk boxbackup-dev at fluffy.co.uk
Sat May 27 10:44:31 BST 2006


Author: chris
Date: 2006-05-27 09:44:17 +0000 (Sat, 27 May 2006)
New Revision: 587

Modified:
   box/chris/general/lib/raidfile/RaidFileWrite.cpp
Log:
* RaidFileWrite.cpp
- Unlink files before renaming over them on Win32


Modified: box/chris/general/lib/raidfile/RaidFileWrite.cpp
===================================================================
--- box/chris/general/lib/raidfile/RaidFileWrite.cpp	2006-05-27 09:43:43 UTC (rev 586)
+++ box/chris/general/lib/raidfile/RaidFileWrite.cpp	2006-05-27 09:44:17 UTC (rev 587)
@@ -564,6 +564,13 @@
 		parity.Close();
 		stripe2.Close();
 		stripe1.Close();
+
+#ifdef WIN32
+		// Must delete before renaming
+		::unlink(stripe1Filename.c_str());
+		::unlink(stripe2Filename.c_str());
+		::unlink(parityFilename.c_str());
+#endif
 		
 		// Rename them into place
 		if(::rename(stripe1FilenameW.c_str(), stripe1Filename.c_str()) != 0




More information about the Boxbackup-dev mailing list