summaryrefslogtreecommitdiff
path: root/xmake
diff options
context:
space:
mode:
authorruki <[email protected]>2026-09-06 15:27:25 +0800
committerGitHub <[email protected]>2026-09-06 15:27:25 +0800
commit2c1fdfbea285c696350e795af7c4d45a2000acf1 (patch)
tree3f8cb32e2ab693f5a8518046a93cfb053df162c3 /xmake
parent266ac8a9c87209d6a828c140393af042e74d3e6c (diff)
parent8102c104461c1bb71a13e4531c59e23e371d35be (diff)
Merge pull request #7753 from zjncs/fix-path-pattern-escape-bracketsmaster
escape brackets in path.pattern
Diffstat (limited to 'xmake')
-rw-r--r--xmake/core/base/path.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/xmake/core/base/path.lua b/xmake/core/base/path.lua
index ee154147f..79317decf 100644
--- a/xmake/core/base/path.lua
+++ b/xmake/core/base/path.lua
@@ -442,7 +442,7 @@ end
function path.pattern(pattern)
-- translate wildcards, e.g. *, **
- pattern = pattern:gsub("([%+%.%-%^%$%(%)%%])", "%%%1")
+ pattern = pattern:gsub("([%+%.%-%^%$%(%)%%%[%]])", "%%%1")
pattern = pattern:gsub("%*%*", "\001")
pattern = pattern:gsub("%*", "\002")
pattern = pattern:gsub("\001", ".*")