From b744805329f6b5f2d5337107023c16c4ccef24ca Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Fri, 5 Sep 2003 18:54:08 +0000 Subject: [PATCH] Fix without playing with IgnoreEmpty. (this code is becoming ugly, I need to clean it up ...) --- stepmania/src/RageUtil_FileDB.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/stepmania/src/RageUtil_FileDB.cpp b/stepmania/src/RageUtil_FileDB.cpp index 72fbb6cc76..5dbcc8e1c9 100644 --- a/stepmania/src/RageUtil_FileDB.cpp +++ b/stepmania/src/RageUtil_FileDB.cpp @@ -258,7 +258,11 @@ bool FilenameDB::ResolvePath(CString &path) /* Split path into components. */ vector p; - split(path, SLASH, p, false); + split(path, SLASH, p, true); + + /* If we have "/foo", then add a blank entry to the beginning to line things up. */ + if( path.Right( strlen(SLASH) ) == SLASH ) + p.insert( p.begin(), "" ); /* Resolve each component. Assume the first component is correct. XXX * don't do that! "Songs/" vs "songs/" */