ResolvePath() in DerefRedir() to fix path problems on non-Win platforms

This commit is contained in:
Chris Danford
2003-07-10 11:47:28 +00:00
parent e5b4b4be6c
commit 571a21eff8
3 changed files with 12 additions and 2 deletions
+9 -2
View File
@@ -472,7 +472,12 @@ CString DerefRedir(const CString &path)
CString sDir, sFName, sExt;
splitrelpath( path, sDir, sFName, sExt );
if(sExt != "redir") return path;
if(sExt != "redir")
{
CString path2 = path;
ResolvePath( path2 );
return path2;
}
CString sNewFileName;
{
@@ -486,7 +491,9 @@ CString DerefRedir(const CString &path)
if(sNewFileName == "")
return "";
return sDir+sNewFileName;
CString path2 = sDir+sNewFileName;
ResolvePath( path2 );
return path2;
}
CString GetRedirContents(const CString &path)
+2
View File
@@ -416,6 +416,8 @@ void GetDirListing( CString sPath, CStringArray &AddTo, bool bOnlyDirs, bool bRe
}
}
bool ResolvePath(CString &path) { return FDB.ResolvePath(path); }
#if 0
bool DoesFileExist( const CString &sPath ) { return FDB.DoesFileExist(sPath); }
+1
View File
@@ -4,6 +4,7 @@
bool DoesFileExist( const CString &sPath );
bool IsAFile( const CString &sPath );
bool IsADirectory( const CString &sPath );
bool ResolvePath(CString &path);
unsigned GetFileSizeInBytes( const CString &sFilePath );
bool DoStat(CString sPath, struct stat *st);