Skip to content

Commit

Permalink
fix copy directory
Browse files Browse the repository at this point in the history
  • Loading branch information
waruqi committed Aug 31, 2022
1 parent f336b0d commit dc99c25
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/tbox/platform/posix/directory.c
Original file line number Diff line number Diff line change
Expand Up @@ -309,13 +309,9 @@ tb_bool_t tb_directory_copy(tb_char_t const* path, tb_char_t const* dest, tb_siz
tuple[3].b = tb_true;
tb_directory_walk_impl(path, -1, tb_true, tb_directory_walk_copy, tuple);

// ok?
tb_bool_t ok = tuple[2].b;

// copy empty directory?
tb_bool_t ok = tuple[3].b;
if (ok && !tb_file_info(dest, tb_null))
return tb_directory_create(dest);

// ok?
return ok;
}

0 comments on commit dc99c25

Please sign in to comment.