1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-15 12:19:02 +00:00

Add clarifying parentheses to complex boolean statements as needed.

This commit is contained in:
dmiller
2019-04-13 21:42:56 +00:00
parent 0855eb4c0c
commit 8d7a2bc004
6 changed files with 13 additions and 7 deletions

View File

@@ -96,7 +96,7 @@ local function absolute_path(base_path, relative_path)
for s in fixdots(path):gmatch("[^/]*") do
if s == "." then -- ignore
elseif s == ".." then -- remove the previous segment
if #segs > 1 or #segs == 1 and segs[#segs] ~= "" then
if #segs > 1 or (#segs == 1 and segs[#segs] ~= "") then
table.remove(segs)
end
else -- add a regular segment, possibly empty