CLOUD: Fix Webserver's usage of DefaultSaveFileManager
concatWithSavesPath() is only defined when curl is used, but was used in Webserver even when curl is unavailable.
This commit is contained in:
parent
579cb59af5
commit
f8fe150130
2 changed files with 8 additions and 0 deletions
|
@ -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)));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue