From 612e2fa1df5e0bc355d96791298ad6d39d714812 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Mon, 9 Oct 2006 05:16:35 +0000 Subject: [PATCH] simplify --- stepmania/src/ActorUtil.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/stepmania/src/ActorUtil.cpp b/stepmania/src/ActorUtil.cpp index 9a60185532..48798cda84 100644 --- a/stepmania/src/ActorUtil.cpp +++ b/stepmania/src/ActorUtil.cpp @@ -330,15 +330,16 @@ Actor* ActorUtil::MakeActor( const RString &sPath_, const XNode *pParent, Actor * evaluated them. Make sure we don't allow double-evaluation. */ ASSERT_M( sPath.empty() || sPath[0] != '@', sPath ); - RString sDir = Dirname( sPath ); FileType ft = GetFileType( sPath ); + if( ft == FT_Directory && sPath.Right(1) != "/" ) + sPath += '/'; + + RString sDir = Dirname( sPath ); switch( ft ) { case FT_Directory: { sDir = sPath; - if( sDir.Right(1) != "/" ) - sDir += '/'; sPath = sDir + "default.xml"; if( !DoesFileExist(sPath) )