From 0860d0352cdfb288ebc0351a55ef381d1ea7a3f7 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sat, 6 Sep 2003 22:55:20 +0000 Subject: [PATCH] Fix path lookup problems. --- stepmania/src/RageUtil_FileDB.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/stepmania/src/RageUtil_FileDB.cpp b/stepmania/src/RageUtil_FileDB.cpp index 076512f595..cd8ad6e94c 100644 --- a/stepmania/src/RageUtil_FileDB.cpp +++ b/stepmania/src/RageUtil_FileDB.cpp @@ -183,6 +183,10 @@ bool FileSet::IsAFile(const CString &path) const /* Given "foo/bar/baz/" or "foo/bar/baz", return "foo/bar/" and "baz". */ static void SplitPath( CString Path, CString &Dir, CString &Name ) { + /* Strip off any trailing slashes. */ + if( Path.size() > 0 && Path.Right(1) == SLASH ) + Path.erase( Path.size()-1 ); + static Regex split("(.*/)([^/]+)"); CStringArray match; if(split.Compare(Path, match)) {