fix paths not resolving correctly if they begin with ./ (CDTitles)

This commit is contained in:
Glenn Maynard
2004-02-27 06:20:59 +00:00
parent 725aa3d4c1
commit bf8ac3e2a8
+14 -8
View File
@@ -151,16 +151,22 @@ RageFileManager::~RageFileManager()
CString LoadedDriver::GetPath( CString path )
{
path.Replace( "\\", "/" );
/* If the path begins with @, default mount points don't count. */
const bool Dedicated = ( path.size() && path[0] == '@' );
if( MountPoint.size() == 0 )
return Dedicated? "":path;
/* Map all slashes to forward slash. */
path.Replace( "\\", "/" );
FixSlashesInPlace( path );
/* Collapse the path, removing any leading dots. (FilenameDB::ResolvePath requires
* this.) */
CollapsePath( path, true );
/* Default mountpoints: */
if( MountPoint.size() == 0 )
{
/* If the path begins with @, default mount points don't count. */
if( path.size() && path[0] == '@' )
return "";
return path;
}
if( path.Left( MountPoint.size() ).CompareNoCase( MountPoint ) )
return ""; /* no match */