Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
waruqi committed Feb 6, 2024
1 parent 4809161 commit d4f9203
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/tbox/platform/windows/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -442,8 +442,13 @@ tb_bool_t tb_file_copy(tb_char_t const* path, tb_char_t const* dest, tb_size_t f
tb_file_info_t info = {0};
if (flags & TB_FILE_COPY_LINK && tb_file_info(path, &info) && info.flags & TB_FILE_FLAG_LINK)
{
tb_trace_i("tb_file_copy link: %s %s", path, dest);
if (tb_kernel32()->CopyFileExW)
return (tb_bool_t)tb_kernel32()->CopyFileExW(full0, full1, tb_null, tb_null, FALSE, COPY_FILE_COPY_SYMLINK);
{
tb_bool_t ok = (tb_bool_t)tb_kernel32()->CopyFileExW(full0, full1, tb_null, tb_null, FALSE, COPY_FILE_COPY_SYMLINK);
tb_trace_i("ok: %d, error: %d", GetLastError());
return ok;
}
// TODO we should read file content to copy it
// ...
}
Expand Down

0 comments on commit d4f9203

Please sign in to comment.