url.lua:remove_dot_components(): empty path component double-dot corner case
This commit is contained in:
parent
5b862e6a3c
commit
38d936ec0e
2 changed files with 5 additions and 0 deletions
|
@ -87,6 +87,10 @@ local function remove_dot_components(path)
|
|||
local was = path
|
||||
path = path:gsub('/%./', '/', 1)
|
||||
until path == was
|
||||
repeat
|
||||
local was = path
|
||||
path = path:gsub('//%.%./([^/]+)', '/%1', 1)
|
||||
until path == was
|
||||
repeat
|
||||
local was = path
|
||||
path = path:gsub('[^/]+/%.%./([^/]+)', '%1', 1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue