if a path ends in a slash, it's always a directory
This commit is contained in:
@@ -630,9 +630,11 @@ FileType ActorUtil::GetFileType( const RString &sPath )
|
|||||||
sExt=="mpg" ) return FT_Movie;
|
sExt=="mpg" ) return FT_Movie;
|
||||||
else if(
|
else if(
|
||||||
sExt=="txt" ) return FT_Model;
|
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. */
|
/* Do this last, to avoid the IsADirectory in most cases. */
|
||||||
else if( IsADirectory(sPath) ) return FT_Directory;
|
else if( IsADirectory(sPath) ) return FT_Directory;
|
||||||
else return FT_Invalid;
|
else return FT_Invalid;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user