From: Christian S. <blu...@us...> - 2005-01-18 19:15:46
|
Update of /cvsroot/planeshift/planeshift/src/updater In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18327/src/updater Modified Files: fileutil.cpp updater.cpp Log Message: - Fixed MakeDirectory and CleanUp functions in the updater for use in non-win32 Index: fileutil.cpp =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/updater/fileutil.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** fileutil.cpp 25 Oct 2004 15:19:30 -0000 1.8 --- fileutil.cpp 18 Jan 2005 19:15:11 -0000 1.9 *************** *** 95,99 **** { if (mkdir (directory, S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH) < 0) ! psupdaterengine->CriticalError("Couldn't create directory '%s'.", directory); } #endif --- 95,100 ---- { if (mkdir (directory, S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH) < 0) ! if(!psupdaterengine->GetVFS()->Exists(csString("/this/") + directory)) ! psupdaterengine->CriticalError("Couldn't create directory '%s'.", directory); } #endif *************** *** 122,126 **** if (rc < 0) ! printf("Couldn't create directory '%s'.", directory); } #endif --- 123,128 ---- if (rc < 0) ! if(!psupdaterengine->GetVFS()->Exists(csString("/this/") + directory)) ! printf("Couldn't create directory '%s'.", directory); } #endif Index: updater.cpp =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/updater/updater.cpp,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** updater.cpp 16 Jan 2005 16:06:17 -0000 1.41 --- updater.cpp 18 Jan 2005 19:15:12 -0000 1.42 *************** *** 1299,1312 **** void Updater::CleanUp() { - #ifdef CS_PLATFORM_WIN32 iVFS* vfs = psupdaterengine->GetVFS(); ! if (vfs->Exists("/this/updatertemp")) { system("rd /S /Q updatertemp"); ! } ! #endif ! } --- 1299,1312 ---- void Updater::CleanUp() { iVFS* vfs = psupdaterengine->GetVFS(); ! if (vfs->Exists("/this/updatertemp")) { + #ifdef CS_PLATFORM_WIN32 system("rd /S /Q updatertemp"); ! #else ! system("rm -fr updatertemp"); #endif ! } } |