diff --git a/stepmania/src/RageFileDriverDirectHelpers.cpp b/stepmania/src/RageFileDriverDirectHelpers.cpp index 4bf2d67eb1..38fed3a05a 100644 --- a/stepmania/src/RageFileDriverDirectHelpers.cpp +++ b/stepmania/src/RageFileDriverDirectHelpers.cpp @@ -233,10 +233,13 @@ DirectFilenameDB::DirectFilenameDB( CString root_ ) void DirectFilenameDB::SetRoot( CString root_ ) { root = root_; - if( root.Right(1) != "/" ) - root += '/'; - if( root == "./" ) - root = ""; + + /* "\abcd\" -> "/abcd/": */ + root.Replace( "\\", "/" ); + + /* "/abcd/" -> "/abcd": */ + if( root.Right(1) == "/" ) + root.erase( root.size()-1, 1 ); }