fix(zip): keep a leading dash from becoming a backend option

This commit is contained in:
Barrett Ruth
2026-07-24 16:28:16 -07:00
parent e29af9c32f
commit e63cf57106
2 changed files with 20 additions and 1 deletions

View File

@@ -18,7 +18,14 @@ end
---@param value string
---@return string
local function literal_pattern(value)
return (value:gsub('\\', '\\\\'):gsub('%?', '\\?'):gsub('%*', '\\*'):gsub('%[', '[[]'))
return (
value
:gsub('\\', '\\\\')
:gsub('%?', '\\?')
:gsub('%*', '\\*')
:gsub('%[', '[[]')
:gsub('^%-', '[-]')
)
end
---@param source string