[Box Backup-commit] COMMIT r999 - box/trunk/test/backupdiff
boxbackup-dev at fluffy.co.uk
boxbackup-dev at fluffy.co.uk
Thu Oct 12 23:20:09 BST 2006
Author: chris
Date: 2006-10-12 23:20:09 +0100 (Thu, 12 Oct 2006)
New Revision: 999
Modified:
box/trunk/test/backupdiff/testbackupdiff.cpp
Log:
* Use CopyFile to copy on Windows, instead of shelling out to cp, which
doesn't understand native paths.
Modified: box/trunk/test/backupdiff/testbackupdiff.cpp
===================================================================
--- box/trunk/test/backupdiff/testbackupdiff.cpp 2006-10-12 22:19:45 UTC (rev 998)
+++ box/trunk/test/backupdiff/testbackupdiff.cpp 2006-10-12 22:20:09 UTC (rev 999)
@@ -213,10 +213,18 @@
}
else
{
+#ifdef WIN32
// Emulate the above stage!
+ char src[256], dst[256];
+ sprintf(src, "testfiles\\f%d.diff", to);
+ sprintf(dst, "testfiles\\f%d.encoded", to);
+ TEST_THAT(CopyFile(src, dst, FALSE) != 0)
+#else
+ // Emulate the above stage!
char cmd[256];
sprintf(cmd, "cp testfiles/f%d.diff testfiles/f%d.encoded", to, to);
::system(cmd);
+#endif
}
// Decode it
More information about the Boxbackup-commit
mailing list