diff options
| -rw-r--r-- | xmake/scripts/base/os.lua | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/xmake/scripts/base/os.lua b/xmake/scripts/base/os.lua index c699bf95a..442ee20e4 100644 --- a/xmake/scripts/base/os.lua +++ b/xmake/scripts/base/os.lua @@ -84,6 +84,11 @@ function os.match(pattern, findir) pattern = pattern:gsub("%*", "\002") pattern = pattern:gsub("\001", ".*") pattern = pattern:gsub("\002", "[^/]*") + + -- patch "./" for matching ok if root directory is '.' + if rootdir == '.' then + pattern = "./" .. pattern + end -- find it return os.find(rootdir, pattern, recurse, findir, excludes) |
