--- a/secureswitools/swisistools/source/sisxlibrary/utility_windows.cpp Thu Aug 19 10:02:49 2010 +0300
+++ b/secureswitools/swisistools/source/sisxlibrary/utility_windows.cpp Tue Aug 31 15:21:33 2010 +0300
@@ -185,15 +185,21 @@
return ::GetLastError();
}
-int FileCopyA(const char* aSrc, const char* aDest, size_t aFlag)
+int FileCopyA(const char* aSrc, const char* aDest, bool aFailIfExistsFlag)
{
- int err=CopyFileA(aSrc,aDest,aFlag);
- return err;
+ // CopyFileA() returns zero on failure and non-zero otherwise.
+ int err=CopyFileA(aSrc,aDest,aFailIfExistsFlag);
+ // To maintain consistency with the LINUX wrapper API FileCopyA() which uses cp
+ // command with system(), we return 0 on success and 1 on failure.
+ return !err;
}
int FileMoveA(const char* aSrc, const char* aDest)
{
+ // MoveFileA() returns zero on failure and non-zero otherwise.
int err=MoveFileA(aSrc,aDest);
- return err;
+ // To maintain consistency with the LINUX wrapper API FileMoveA() which uses mv
+ // command with system(), we return 0 on success and 1 on failure.
+ return !err;
}