clean up file drivers: drivers now always receive paths with trailing slashes;

this makes handling the relative "root" directory not a special case (".").
mountpoints now always begin with a slash.  before, "/foo" and "foo" were
in two separate namespaces, which was weird and confusing; the two now
mean the same thing.  there are no more special "default mountpoints"; just
mount to "/".  "@path" mounts are now "/@path", and they do show up in
GetDirListing("/") (but, as before, opening "/@foo/bar" will never create
a "@foo/bar" path in a non-"@foo" mountpoint)
This commit is contained in:
Glenn Maynard
2005-05-20 22:26:54 +00:00
parent 9b5187d700
commit 209040e02d
5 changed files with 26 additions and 19 deletions
+1 -2
View File
@@ -103,6 +103,7 @@ RageFileObj *MakeFileObjDirect( CString sPath, int mode, int &err )
RageFileBasic *RageFileDriverDirect::Open( const CString &path, int mode, int &err )
{
ASSERT( path.size() && path[0] == '/' );
CString sPath = path;
/* This partially resolves. For example, if "abc/def" exists, and we're opening
@@ -174,8 +175,6 @@ bool RageFileDriverDirect::Ready()
bool RageFileDriverDirect::Remount( const CString &sPath )
{
root = sPath;
if( root.Right(1) != "/" )
root += '/';
((DirectFilenameDB *) FDB)->SetRoot( sPath );
/* If the root path doesn't exist, create it. */