From 633adf30b788e658e00a5a8a0dcda39605ff88cb Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sat, 14 Oct 2006 02:57:24 +0000 Subject: [PATCH] if a path ends in a slash, it's always a directory --- stepmania/src/ActorUtil.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/stepmania/src/ActorUtil.cpp b/stepmania/src/ActorUtil.cpp index c1375a1414..91728192b5 100644 --- a/stepmania/src/ActorUtil.cpp +++ b/stepmania/src/ActorUtil.cpp @@ -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; } /*