fix AdditionalSongFolders

This commit is contained in:
Glenn Maynard
2003-12-18 08:48:36 +00:00
parent 8e1fa6955b
commit f243a4d52f
+5 -3
View File
@@ -386,14 +386,16 @@ void FilenameDB::GetDirListing( CString sPath, CStringArray &AddTo, bool bOnlyDi
/* Strip off the last path element and use it as a mask. */ /* Strip off the last path element and use it as a mask. */
unsigned pos = sPath.find_last_of( '/' ); unsigned pos = sPath.find_last_of( '/' );
CString fn; CString fn;
if(pos != sPath.npos) if( pos == sPath.npos )
{ {
fn = sPath;
sPath = "";
} else {
fn = sPath.substr(pos+1); fn = sPath.substr(pos+1);
sPath = sPath.substr(0, pos+1); sPath = sPath.substr(0, pos+1);
} }
/* If there was only one path element, or if the last element was empty, /* If the last element was empty, use "*". */
* use "*". */
if( fn.size() == 0 ) if( fn.size() == 0 )
fn = "*"; fn = "*";