instead of assuming png, and returning a bad filename, return false

This commit is contained in:
Glenn Maynard
2006-10-15 03:59:24 +00:00
parent 7962c4c739
commit f0227238a5
2 changed files with 4 additions and 6 deletions
+3 -5
View File
@@ -47,7 +47,7 @@ Actor* ActorUtil::Create( const RString& sClassName, const XNode* pNode, Actor *
return pRet;
}
void ActorUtil::ResolvePath( RString &sPath, const RString &sName )
bool ActorUtil::ResolvePath( RString &sPath, const RString &sName )
{
retry:
CollapsePath( sPath );
@@ -72,10 +72,7 @@ retry:
FlushDirCache();
goto retry;
case Dialog::ignore:
asPaths.push_back( sPath );
if( GetExtension(asPaths[0]) == "" )
asPaths[0] = SetExtension( asPaths[0], "png" );
break;
return false;
default:
ASSERT(0);
}
@@ -107,6 +104,7 @@ retry:
}
sPath = DerefRedir( sPath );
return true;
}
static void PushParamsTable( Lua *L )
+1 -1
View File
@@ -71,7 +71,7 @@ namespace ActorUtil
RString GetWhere( const XNode *pNode );
bool GetAttrPath( const XNode *pNode, const RString &sName, RString &sOut );
void ResolvePath( RString &sPath, const RString &sName );
bool ResolvePath( RString &sPath, const RString &sName );
void SortByZPosition( vector<Actor*> &vActors );