diff options
| author | ruki <[email protected]> | 2017-02-17 21:18:27 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2017-02-17 21:18:27 +0800 |
| commit | f40e78236da8c17d9417da88b8cf077c03a38fa8 (patch) | |
| tree | 7cb93be640835eb10fe8b5b9cbb964fc5c6fde95 /core/src | |
| parent | d198f05685c745be00517f2838dadc4fa18e7808 (diff) | |
fix os.match for relative path
Diffstat (limited to 'core/src')
| -rwxr-xr-x | core/src/xmake/os/find.c | 4 |
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; |
