ResolvePath() in DerefRedir() to fix path problems on non-Win platforms
This commit is contained in:
@@ -472,7 +472,12 @@ CString DerefRedir(const CString &path)
|
|||||||
CString sDir, sFName, sExt;
|
CString sDir, sFName, sExt;
|
||||||
splitrelpath( path, 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;
|
CString sNewFileName;
|
||||||
{
|
{
|
||||||
@@ -486,7 +491,9 @@ CString DerefRedir(const CString &path)
|
|||||||
if(sNewFileName == "")
|
if(sNewFileName == "")
|
||||||
return "";
|
return "";
|
||||||
|
|
||||||
return sDir+sNewFileName;
|
CString path2 = sDir+sNewFileName;
|
||||||
|
ResolvePath( path2 );
|
||||||
|
return path2;
|
||||||
}
|
}
|
||||||
|
|
||||||
CString GetRedirContents(const CString &path)
|
CString GetRedirContents(const CString &path)
|
||||||
|
|||||||
@@ -416,6 +416,8 @@ void GetDirListing( CString sPath, CStringArray &AddTo, bool bOnlyDirs, bool bRe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ResolvePath(CString &path) { return FDB.ResolvePath(path); }
|
||||||
|
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
bool DoesFileExist( const CString &sPath ) { return FDB.DoesFileExist(sPath); }
|
bool DoesFileExist( const CString &sPath ) { return FDB.DoesFileExist(sPath); }
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
bool DoesFileExist( const CString &sPath );
|
bool DoesFileExist( const CString &sPath );
|
||||||
bool IsAFile( const CString &sPath );
|
bool IsAFile( const CString &sPath );
|
||||||
bool IsADirectory( const CString &sPath );
|
bool IsADirectory( const CString &sPath );
|
||||||
|
bool ResolvePath(CString &path);
|
||||||
unsigned GetFileSizeInBytes( const CString &sFilePath );
|
unsigned GetFileSizeInBytes( const CString &sFilePath );
|
||||||
bool DoStat(CString sPath, struct stat *st);
|
bool DoStat(CString sPath, struct stat *st);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user