if a path ends in a slash, it's always a directory

This commit is contained in:
Glenn Maynard
2006-10-14 02:57:24 +00:00
parent 98a752669f
commit 633adf30b7
+3 -1
View File
@@ -630,9 +630,11 @@ FileType ActorUtil::GetFileType( const RString &sPath )
sExt=="mpg" ) return FT_Movie;
else if(
sExt=="txt" ) return FT_Model;
else if( sPath.size() > 0 && sPath[sPath.size()-1] == '/' )
return FT_Directory;
/* Do this last, to avoid the IsADirectory in most cases. */
else if( IsADirectory(sPath) ) return FT_Directory;
else return FT_Invalid;
else return FT_Invalid;
}
/*