[Scummvm-git-logs] scummvm master -> 8d261d559e09ee62f00bbe4bdf20bd3168c0e072
antoniou79
a.antoniou79 at gmail.com
Wed Oct 7 20:44:19 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:
8d261d559e BACKENDS: NETWORKING: Add fringe case for hasPermittedPrefix() return clause
Commit: 8d261d559e09ee62f00bbe4bdf20bd3168c0e072
https://github.com/scummvm/scummvm/commit/8d261d559e09ee62f00bbe4bdf20bd3168c0e072
Author: antoniou (a.antoniou79 at gmail.com)
Date: 2020-10-07T23:44:08+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 1999ea7881..5706887009 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