[Box Backup-dev] COMMIT r914 - box/chris/merge/test/backupdiff
boxbackup-dev at fluffy.co.uk
boxbackup-dev at fluffy.co.uk
Fri Sep 1 08:51:46 BST 2006
Author: chris
Date: 2006-09-01 08:51:45 +0100 (Fri, 01 Sep 2006)
New Revision: 914
Modified:
box/chris/merge/test/backupdiff/testbackupdiff.cpp
Log:
(refs #3)
Use CopyFile to copy on Windows, instead of shelling out to cp, which
doesn't understand native paths.
Modified: box/chris/merge/test/backupdiff/testbackupdiff.cpp
===================================================================
--- box/chris/merge/test/backupdiff/testbackupdiff.cpp 2006-09-01 07:50:47 UTC (rev 913)
+++ box/chris/merge/test/backupdiff/testbackupdiff.cpp 2006-09-01 07:51:45 UTC (rev 914)
@@ -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-dev
mailing list