diff --git a/src/utils/native_file.cpp b/src/utils/native_file.cpp index 6221e7fd..0ccbd793 100644 --- a/src/utils/native_file.cpp +++ b/src/utils/native_file.cpp @@ -40,13 +40,13 @@ auto native_file::clone(const native_file_ptr &ptr) -> native_file_ptr { #ifdef _WIN32 source_path.resize(MAX_PATH + 1); - ::GetFinalPathNameByHandleA(nf->get_handle(), source_path.data(), + ::GetFinalPathNameByHandleA(ptr->get_handle(), source_path.data(), MAX_PATH + 1, FILE_NAME_NORMALIZED | VOLUME_NAME_DOS); #else source_path.resize(PATH_MAX + 1); #ifdef __APPLE__ - fcntl(nf->get_handle(), F_GETPATH, source_path.data()); + fcntl(ptr->get_handle(), F_GETPATH, source_path.data()); #else readlink(("/proc/self/fd/" + std::to_string(ptr->get_handle())).c_str(), source_path.data(), source_path.size());