Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Sunrisepeak committed Sep 22, 2024
1 parent ec1370b commit 49e71d4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/tbox/platform/bsd/fwatcher_kqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -304,8 +304,8 @@ tb_bool_t tb_fwatcher_add(tb_fwatcher_ref_t self, tb_char_t const* watchdir, tb_
return tb_false;

// is directory? we need scan it and add all subfiles
if (info.type == TB_FILE_TYPE_DIRECTORY)
tb_directory_walk(watchdir, recursion? -1 : 0, tb_true, tb_fwatcher_add_watch_filedirs, fwatcher);
if (info.type == TB_FILE_TYPE_DIRECTORY && recursion)
tb_directory_walk(watchdir, -1, tb_true, tb_fwatcher_add_watch_filedirs, fwatcher);
return tb_fwatcher_add_watch(fwatcher, watchdir, recursion);
}

Expand Down

0 comments on commit 49e71d4

Please sign in to comment.