summaryrefslogtreecommitdiff
path: root/core/src
diff options
context:
space:
mode:
authorruki <[email protected]>2017-02-17 21:18:27 +0800
committerruki <[email protected]>2017-02-17 21:18:27 +0800
commitf40e78236da8c17d9417da88b8cf077c03a38fa8 (patch)
tree7cb93be640835eb10fe8b5b9cbb964fc5c6fde95 /core/src
parentd198f05685c745be00517f2838dadc4fa18e7808 (diff)
fix os.match for relative path
Diffstat (limited to 'core/src')
-rwxr-xr-xcore/src/xmake/os/find.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/src/xmake/os/find.c b/core/src/xmake/os/find.c
index 4cca6605c..ea847f195 100755
--- a/core/src/xmake/os/find.c
+++ b/core/src/xmake/os/find.c
@@ -51,6 +51,10 @@ static tb_bool_t xm_os_find_walk(tb_char_t const* path, tb_file_info_t const* in
tb_char_t const* pattern = (tb_char_t const*)tuple[1].cstr;
tb_assert_and_check_return_val(pattern, tb_false);
+ // remove ./ for path
+ if (path[0] == '.' && (path[1] == '/' || path[1] == '\\'))
+ path = path + 2;
+
// the match mode
tb_long_t mode = tuple[2].l;