Fix #8886: Don't try to resolve folders within tars named '.'

(cherry picked from commit 2d7b34bc68)
This commit is contained in:
Charles Pigott
2021-03-25 20:29:18 +00:00
committed by Jonathan G Rennison
parent 213b6fe6ef
commit 583304927b

View File

@@ -432,6 +432,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);
}