diff --git a/include/fast_io_hosted/filesystem/nt_at.h b/include/fast_io_hosted/filesystem/nt_at.h index 0a89f8c2..e3efc72b 100644 --- a/include/fast_io_hosted/filesystem/nt_at.h +++ b/include/fast_io_hosted/filesystem/nt_at.h @@ -177,7 +177,16 @@ inline void nt_linkat_impl(void *olddirhd, char16_t const *oldpath_c_str, ::std: if ((flags & nt_at_flags::empty_path) == nt_at_flags::empty_path) { - file = ::fast_io::basic_nt_family_io_observer{olddirhd}; + if (oldpath_size != 0) + { + basic_file = ::fast_io::basic_nt_family_file{ + nt_call_callback(olddirhd, oldpath_c_str, oldpath_size, nt_create_callback{md})}; + file = basic_file; + } + else + { + file = ::fast_io::basic_nt_family_io_observer{olddirhd}; + } } else {