diff options
author | Charles Pigott <charlespigott@googlemail.com> | 2021-03-25 20:29:18 +0000 |
---|---|---|
committer | Charles Pigott <charlespigott@googlemail.com> | 2021-03-28 09:52:15 +0100 |
commit | 2d7b34bc68f7fb0e707129e4d97383b18f1da55e (patch) | |
tree | fae5cf2351d7b002c5f00d48e09e4a75dfdfea5e | |
parent | a36b286e04a6c420a24443a480e09ca277334d81 (diff) | |
download | openttd-2d7b34bc68f7fb0e707129e4d97383b18f1da55e.tar.xz |
Fix #8886: Don't try to resolve folders within tars named '.'
-rw-r--r-- | src/fileio.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/fileio.cpp b/src/fileio.cpp index 045e56181..9a9e7e05d 100644 --- a/src/fileio.cpp +++ b/src/fileio.cpp @@ -429,6 +429,9 @@ FILE *FioFOpenFile(const std::string &filename, const char *mode, Subdirectory s if (token == "..") { if (tokens.size() < 2) return nullptr; tokens.pop_back(); + } else if (token == ".") { + /* Do nothing. "." means current folder, but you can create tar files with "." in the path. + * This confuses our file resolver. So, act like this folder doesn't exist. */ } else { tokens.push_back(token); } |