From: <mg...@us...> - 2008-05-26 20:57:40
|
Revision: 1604 http://planeshift.svn.sourceforge.net/planeshift/?rev=1604&view=rev Author: mgist Date: 2008-05-26 13:57:47 -0700 (Mon, 26 May 2008) Log Message: ----------- - Fixes for last commit. Modified Paths: -------------- trunk/src/common/util/fileutil.cpp trunk/src/common/util/pscssetup.cpp Modified: trunk/src/common/util/fileutil.cpp =================================================================== --- trunk/src/common/util/fileutil.cpp 2008-05-26 20:47:47 UTC (rev 1603) +++ trunk/src/common/util/fileutil.cpp 2008-05-26 20:57:47 UTC (rev 1604) @@ -45,8 +45,10 @@ { csString fullpath("/this/"); fullpath.Append(path); + + csRef<iDataBuffer> db = vfs->GetRealPath(fullpath); struct stat filestats; - if (stat(vfs->GetRealPath(fullpath), &filestats) < 0) + if (stat(db->GetData(), &filestats) < 0) return NULL; csRef<FileStat> filestat; @@ -166,7 +168,7 @@ file = buff->GetData(); } - FileStat* stat = StatFile(file); + csRef<FileStat> stat = StatFile(file); if(stat && stat->readonly) { if(!silent) Modified: trunk/src/common/util/pscssetup.cpp =================================================================== --- trunk/src/common/util/pscssetup.cpp 2008-05-26 20:47:47 UTC (rev 1603) +++ trunk/src/common/util/pscssetup.cpp 2008-05-26 20:57:47 UTC (rev 1604) @@ -390,7 +390,8 @@ // Create the mount point if it doesn't exist...die if we can't. FileUtil fileUtil(vfs); - if (!fileUtil.StatFile(configPath) && CS_MKDIR(configPath) < 0) + csRef<FileStat> filestat = fileUtil.StatFile(configPath); + if (filestat.IsValid() && CS_MKDIR(configPath) < 0) { printf("Could not create required %s directory!\n", configPath.GetData()); PS_PAUSEEXIT(1); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |