[Scummvm-git-logs] scummvm master -> f6fab837db304925055b040acaf5e68808842666

sev- sev at scummvm.org
Sun May 24 21:21:01 UTC 2020


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
f6fab837db DIRECTOR: Fix file path loading


Commit: f6fab837db304925055b040acaf5e68808842666
    https://github.com/scummvm/scummvm/commit/f6fab837db304925055b040acaf5e68808842666
Author: Roland van Laar (roland at rolandvanlaar.nl)
Date: 2020-05-24T23:20:57+02:00

Commit Message:
DIRECTOR: Fix file path loading

Filepaths are converted between mac and windows filepaths. In some cases the filenames were converted correctly, without doing a pass. A filepath conversion would return the same filepath. This wasn't recognized as a conversion that succeeded.

The fix is check if the resulting filename can be opened.

Changed paths:
    engines/director/util.cpp


diff --git a/engines/director/util.cpp b/engines/director/util.cpp
index 4b806afc71..ae624da4fc 100644
--- a/engines/director/util.cpp
+++ b/engines/director/util.cpp
@@ -252,7 +252,7 @@ Common::String pathMakeRelative(Common::String path, bool recursive, bool addext
 
 				Common::String res = pathMakeRelative(newpath, false, false);
 
-				if (!res.equals(newpath))
+				if (f.open(res))
 					return res;
 			}
 		}




More information about the Scummvm-git-logs mailing list