locateResource() checks for full path already

This commit is contained in:
Josh Holtrop 2011-05-26 23:08:34 -04:00
parent 2f57e27988
commit 6952d2f9c0

View File

@ -327,7 +327,9 @@ void Engine::registerLibraries()
string Engine::locateResource(const string & shortname)
{
string try_path;
string try_path = shortname;
if (fileExists(try_path))
return try_path;
/* look for the resource relative to the loaded script's directory */
try_path = m_program_directory + "/" + shortname;