diff --git a/src/Engine.cc b/src/Engine.cc index 2eed72e..ede1072 100644 --- a/src/Engine.cc +++ b/src/Engine.cc @@ -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;