mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-05 01:38:36 +00:00
DIRECTOR: Improved file search in pathMakeRelative()
This commit is contained in:
parent
d7c3615716
commit
835f961782
@ -394,6 +394,10 @@ Common::String getPath(Common::String path, Common::String cwd) {
|
||||
bool testPath(Common::String &path, bool directory) {
|
||||
Common::FSNode d = Common::FSNode(*g_director->getGameDataDir());
|
||||
|
||||
// Test if we have it right in the SearchMan
|
||||
if (SearchMan.hasFile(Common::Path(path, g_director->_dirSeparator)))
|
||||
return true;
|
||||
|
||||
// check for the game data dir
|
||||
if (!path.contains(g_director->_dirSeparator) && path.equalsIgnoreCase(d.getName())) {
|
||||
if (!directory)
|
||||
|
Loading…
x
Reference in New Issue
Block a user