Skip to content

Commit

Permalink
improve copy directory
Browse files Browse the repository at this point in the history
  • Loading branch information
waruqi committed Feb 6, 2024
1 parent 548aa6b commit f132aac
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/tbox/platform/windows/directory.c
Expand Up @@ -343,13 +343,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(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 f132aac

Please sign in to comment.