aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backends/networking/sdl_net/handlers/filesbasehandler.cpp4
-rw-r--r--backends/networking/sdl_net/handlerutils.cpp4
2 files changed, 8 insertions, 0 deletions
diff --git a/backends/networking/sdl_net/handlers/filesbasehandler.cpp b/backends/networking/sdl_net/handlers/filesbasehandler.cpp
index 135e0fb100..a585af9b5a 100644
--- a/backends/networking/sdl_net/handlers/filesbasehandler.cpp
+++ b/backends/networking/sdl_net/handlers/filesbasehandler.cpp
@@ -69,8 +69,12 @@ bool FilesBaseHandler::transformPath(Common::String &path, Common::String &prefi
prefixToAdd = "/saves/";
// determine savepath (prefix to remove)
+#ifdef USE_LIBCURL
DefaultSaveFileManager *manager = dynamic_cast<DefaultSaveFileManager *>(g_system->getSavefileManager());
prefixToRemove = (manager ? manager->concatWithSavesPath("") : ConfMan.get("savepath"));
+#else
+ prefixToRemove = ConfMan.get("savepath");
+#endif
if (prefixToRemove.size() && prefixToRemove.lastChar() != '/' && prefixToRemove.lastChar() != '\\')
prefixToRemove += '/';
diff --git a/backends/networking/sdl_net/handlerutils.cpp b/backends/networking/sdl_net/handlerutils.cpp
index dc21ab5ce1..fba00aef59 100644
--- a/backends/networking/sdl_net/handlerutils.cpp
+++ b/backends/networking/sdl_net/handlerutils.cpp
@@ -159,8 +159,12 @@ bool HandlerUtils::hasPermittedPrefix(const Common::String &path) {
}
// prefix for /saves/
+#ifdef USE_LIBCURL
DefaultSaveFileManager *manager = dynamic_cast<DefaultSaveFileManager *>(g_system->getSavefileManager());
prefix = (manager ? manager->concatWithSavesPath("") : ConfMan.get("savepath"));
+#else
+ prefix = ConfMan.get("savepath");
+#endif
return (normalized.hasPrefix(normalizePath(prefix)));
}