locateResource() checks for full path already
This commit is contained in:
parent
2f57e27988
commit
6952d2f9c0
@ -327,7 +327,9 @@ void Engine::registerLibraries()
|
|||||||
|
|
||||||
string Engine::locateResource(const string & shortname)
|
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 */
|
/* look for the resource relative to the loaded script's directory */
|
||||||
try_path = m_program_directory + "/" + shortname;
|
try_path = m_program_directory + "/" + shortname;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user