From 6ea32749b78437907a35a5659ccc307b73778ed8 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sat, 6 Dec 2003 05:52:44 +0000 Subject: [PATCH] don't mangle Root in RageFileManager --- stepmania/src/RageFileDriverDirect.cpp | 2 ++ stepmania/src/RageFileManager.cpp | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/stepmania/src/RageFileDriverDirect.cpp b/stepmania/src/RageFileDriverDirect.cpp index ba22cde044..c9db248878 100644 --- a/stepmania/src/RageFileDriverDirect.cpp +++ b/stepmania/src/RageFileDriverDirect.cpp @@ -40,6 +40,8 @@ public: RageFileDriverDirect::RageFileDriverDirect( CString root_ ): root(root_) { + if( root.Right(1) != "/" ) + root += '/'; } void FDB_GetDirListing( CString sPath, CStringArray &AddTo, bool bOnlyDirs, bool bReturnPathToo ); diff --git a/stepmania/src/RageFileManager.cpp b/stepmania/src/RageFileManager.cpp index 2f3b85df39..54369543fe 100644 --- a/stepmania/src/RageFileManager.cpp +++ b/stepmania/src/RageFileManager.cpp @@ -2,6 +2,7 @@ #include "RageFileManager.h" #include "RageFileDriver.h" #include "RageUtil.h" +#include "RageLog.h" #include RageFileManager *FILEMAN = NULL; @@ -120,8 +121,6 @@ void RageFileManager::Mount( CString Type, CString Root, CString MountPoint ) if( MountPoint.size() && MountPoint.Right(1) != "/" ) MountPoint += '/'; ASSERT( Root != "" ); - if( Root.Right(1) != "/" ) - Root += '/'; RageFileDriver *driver = NULL; if( !Type.CompareNoCase("DIR") ) @@ -130,7 +129,11 @@ void RageFileManager::Mount( CString Type, CString Root, CString MountPoint ) } if( !driver ) + { + LOG->Warn("Can't mount unknown VFS type \"%s\", root \"%s\"", Type.c_str(), Root.c_str() ); return; + } + LoadedDriver ld; ld.driver = driver; ld.MountPoint = MountPoint;