don't mangle Root in RageFileManager
This commit is contained in:
@@ -40,6 +40,8 @@ public:
|
|||||||
RageFileDriverDirect::RageFileDriverDirect( CString root_ ):
|
RageFileDriverDirect::RageFileDriverDirect( CString root_ ):
|
||||||
root(root_)
|
root(root_)
|
||||||
{
|
{
|
||||||
|
if( root.Right(1) != "/" )
|
||||||
|
root += '/';
|
||||||
}
|
}
|
||||||
|
|
||||||
void FDB_GetDirListing( CString sPath, CStringArray &AddTo, bool bOnlyDirs, bool bReturnPathToo );
|
void FDB_GetDirListing( CString sPath, CStringArray &AddTo, bool bOnlyDirs, bool bReturnPathToo );
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
#include "RageFileManager.h"
|
#include "RageFileManager.h"
|
||||||
#include "RageFileDriver.h"
|
#include "RageFileDriver.h"
|
||||||
#include "RageUtil.h"
|
#include "RageUtil.h"
|
||||||
|
#include "RageLog.h"
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
RageFileManager *FILEMAN = NULL;
|
RageFileManager *FILEMAN = NULL;
|
||||||
@@ -120,8 +121,6 @@ void RageFileManager::Mount( CString Type, CString Root, CString MountPoint )
|
|||||||
if( MountPoint.size() && MountPoint.Right(1) != "/" )
|
if( MountPoint.size() && MountPoint.Right(1) != "/" )
|
||||||
MountPoint += '/';
|
MountPoint += '/';
|
||||||
ASSERT( Root != "" );
|
ASSERT( Root != "" );
|
||||||
if( Root.Right(1) != "/" )
|
|
||||||
Root += '/';
|
|
||||||
|
|
||||||
RageFileDriver *driver = NULL;
|
RageFileDriver *driver = NULL;
|
||||||
if( !Type.CompareNoCase("DIR") )
|
if( !Type.CompareNoCase("DIR") )
|
||||||
@@ -130,7 +129,11 @@ void RageFileManager::Mount( CString Type, CString Root, CString MountPoint )
|
|||||||
}
|
}
|
||||||
|
|
||||||
if( !driver )
|
if( !driver )
|
||||||
|
{
|
||||||
|
LOG->Warn("Can't mount unknown VFS type \"%s\", root \"%s\"", Type.c_str(), Root.c_str() );
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
LoadedDriver ld;
|
LoadedDriver ld;
|
||||||
ld.driver = driver;
|
ld.driver = driver;
|
||||||
ld.MountPoint = MountPoint;
|
ld.MountPoint = MountPoint;
|
||||||
|
|||||||
Reference in New Issue
Block a user