If multiple '..' handle correctly.

This commit is contained in:
Adam Harrison 2021-08-11 20:54:03 -04:00
parent 5e66f74f38
commit e2a7578553
1 changed files with 1 additions and 1 deletions

View File

@ -284,7 +284,7 @@ function common.normalize_path(filename)
local parts = split_on_slash(filename, PATHSEP)
local accu = {}
for _, part in ipairs(parts) do
if part == '..' and #accu > 0 then
if part == '..' and #accu > 0 and accu[#accu] ~= ".." then
table.remove(accu)
elseif part ~= '.' then
table.insert(accu, part)