diff -r 79647526f98c -r 42552535c1ac secureswitools/swisistools/source/sisxlibrary/utility_linux.cpp --- a/secureswitools/swisistools/source/sisxlibrary/utility_linux.cpp Wed Sep 15 12:20:42 2010 +0300 +++ b/secureswitools/swisistools/source/sisxlibrary/utility_linux.cpp Wed Oct 13 14:40:19 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of the License "Eclipse Public License v1.0" @@ -175,24 +175,18 @@ int _wunlink(const wchar_t* wc) { int ret = 0; - const int len = wcstombs(0,wc,-1); - - char* tmp = new char[len+1]; + int len = wcstombs(0,wc,-1); + char *tmp = new char[len]; ret = wcstombs(tmp, wc, len); - if(ret == -1) { printf("wunlink: wcstombs error\n"); - delete [] tmp; + delete[] tmp; return ret; } - tmp[ret] = '\0'; ret = unlink(tmp); - if(ret != 0) printf("wunlink: %s: %s\n", tmp, strerror(ret)); - - delete [] tmp; return ret; } @@ -627,35 +621,5 @@ } -int FileCopyA(const char* aSrc, const char* aDest, size_t aFlag) - { - int err= 0; - const int len = 512; - // Overwrites the orphaned file(if any). - char cmd[ len ] = "cp -f "; - strcat(cmd, aSrc); - strcat(cmd, " "); - strcat(cmd, aDest); - strcat(cmd, " 2> /dev/null"); - - err = system(cmd); - return err; - } - -int FileMoveA(const char* aSrc, const char* aDest) - { - int err= 0; - // Overwrites the orphaned file(if any). - char cmd[ 512 ] = "mv -f "; - strcat(cmd, aSrc); - strcat(cmd, " "); - strcat(cmd, aDest); - strcat(cmd, " 2> /dev/null"); - - err = system(cmd); - - return err; - } -