summaryrefslogtreecommitdiff
path: root/core/src
diff options
context:
space:
mode:
authorruki <[email protected]>2017-06-05 13:00:56 +0800
committerruki <[email protected]>2017-06-05 13:00:56 +0800
commit36034c15b390bdfdd095df85cfb345c4b9f68250 (patch)
tree3850073ded8e7c9e395e998e3a7bc6a9c3570ced /core/src
parentc681e7a5fa72d7c51163d161c593c0b78e88bdee (diff)
fix os.match with exclude mode
Diffstat (limited to 'core/src')
-rw-r--r--core/src/xmake/os/find.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/src/xmake/os/find.c b/core/src/xmake/os/find.c
index ac336b52d..a4e590f8a 100644
--- a/core/src/xmake/os/find.c
+++ b/core/src/xmake/os/find.c
@@ -97,8 +97,9 @@ static tb_bool_t xm_os_find_walk(tb_char_t const* path, tb_file_info_t const* in
tb_assert(!tb_strcmp(path, rootdir));
tb_assert(rootlen + 1 <= tb_strlen(path));
- // skip the rootdir
- path += rootlen + 1;
+ // skip the rootdir if not "."
+ if (tb_strcmp(rootdir, "."))
+ path += rootlen + 1;
// exclude pathes
tb_int_t i = 0;