mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Fixed log entry for PatchFileXX options
(also allow using ".\\", as it cannot escape the game folder.)
This commit is contained in:
@@ -279,9 +279,7 @@ static bool NormalizePath(std::string &path) {
|
||||
path.erase(0, path.find_first_not_of('\\'));
|
||||
|
||||
// Disallow paths trying to "escape" game folder:
|
||||
if (path.find(':') != std::string::npos ||
|
||||
path.find(".\\") != std::string::npos ||
|
||||
path.find("..\\") != std::string::npos) {
|
||||
if (path.find(':') != std::string::npos || path.find("..\\") != std::string::npos) {
|
||||
return false;
|
||||
}
|
||||
return !path.empty();
|
||||
@@ -324,7 +322,7 @@ static void GetExtraPatches() {
|
||||
for (int i = 0; i < 100; i++) {
|
||||
_itoa(i, &patchFile[9], 10);
|
||||
auto patch = IniReader::GetConfigString("ExtraPatches", patchFile, "");
|
||||
if (!ValidateExtraPatch(patch, "", patchFile)) continue;
|
||||
if (!ValidateExtraPatch(patch, ".\\", patchFile)) continue;
|
||||
patchFiles.push_back(patch);
|
||||
}
|
||||
const std::string modsPath = ".\\mods\\";
|
||||
|
||||
Reference in New Issue
Block a user