[Scummvm-git-logs] scummvm branch-2-2 -> 96c55b1cbaf4647e80613d192a2030c30cdb264a
antoniou79
a.antoniou79 at gmail.com
Wed Oct 7 20:46:13 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:
96c55b1cba BACKENDS: NETWORKING: Add fringe case for hasPermittedPrefix() return clause
Commit: 96c55b1cbaf4647e80613d192a2030c30cdb264a
https://github.com/scummvm/scummvm/commit/96c55b1cbaf4647e80613d192a2030c30cdb264a
Author: antoniou (a.antoniou79 at gmail.com)
Date: 2020-10-07T23:46:03+03:00
Commit Message:
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 '/'
Changed paths:
backends/networking/sdl_net/handlerutils.cpp
diff --git a/backends/networking/sdl_net/handlerutils.cpp b/backends/networking/sdl_net/handlerutils.cpp
index 22bea0755a..9478dadef3 100644
--- a/backends/networking/sdl_net/handlerutils.cpp
+++ b/backends/networking/sdl_net/handlerutils.cpp
@@ -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) {
More information about the Scummvm-git-logs
mailing list