diff -r 5cc91383ab1e -r 7333d7932ef7 secureswitools/swisistools/source/sisxlibrary/utility_linux.cpp --- a/secureswitools/swisistools/source/sisxlibrary/utility_linux.cpp Thu Aug 19 10:02:49 2010 +0300 +++ b/secureswitools/swisistools/source/sisxlibrary/utility_linux.cpp Tue Aug 31 15:21:33 2010 +0300 @@ -627,12 +627,19 @@ } -int FileCopyA(const char* aSrc, const char* aDest, size_t aFlag) +int FileCopyA(const char* aSrc, const char* aDest, bool aFailIfExistsFlag) { int err= 0; - const int len = 512; - // Overwrites the orphaned file(if any). - char cmd[ len ] = "cp -f "; + + char cmd[ commandLength ] = ""; + if( aFailIfExistsFlag ) + { + strcpy(cmd, "cp "); + } + else + { + strcpy(cmd, "cp -f "); + } strcat(cmd, aSrc); strcat(cmd, " "); strcat(cmd, aDest); @@ -642,13 +649,12 @@ return err; } - int FileMoveA(const char* aSrc, const char* aDest) { int err= 0; // Overwrites the orphaned file(if any). - char cmd[ 512 ] = "mv -f "; + char cmd[ commandLength ] = "mv -f "; strcat(cmd, aSrc); strcat(cmd, " "); strcat(cmd, aDest);