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

This commit is contained in:
Charles Pigott 2021-03-25 20:29:18 +00:00 committed by Patric Stout
parent 4bcc3a4f3f
commit 2b78c22349
1 changed files with 3 additions and 0 deletions

View File

@ -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);
}