From 6952d2f9c0f08156fb5c4570c020dd183876a48f Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Thu, 26 May 2011 23:08:34 -0400 Subject: [PATCH] locateResource() checks for full path already --- src/Engine.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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;