BACKENDS: NETWORKING: Add fringe case for hasPermittedPrefix() return clause

Android port was failing because the normalized prefix ended in '/' and the normalized path was identical except for the trailing '/'
This commit is contained in:
antoniou 2020-10-07 23:37:29 +03:00
parent 5acba2df0c
commit 96c55b1cba

View file

@ -165,7 +165,8 @@ bool HandlerUtils::hasPermittedPrefix(const Common::String &path) {
#else
prefix = ConfMan.get("savepath");
#endif
return (normalized.hasPrefix(normalizePath(prefix)));
return normalized.hasPrefix(normalizePath(prefix))
|| normalizePath(prefix).compareTo(normalized + "/") == 0;
}
bool HandlerUtils::permittedPath(const Common::String path) {