[bug] Windows-to-Linux remote mount ignores CREATE_NEW #44
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good

This commit is contained in:
Scott E. Graves 2025-04-04 13:05:02 -05:00
parent 88398485e1
commit 0603463885
2 changed files with 8 additions and 8 deletions

View File

@ -142,16 +142,18 @@ public:
granted_access, attributes,
allocation_size, &file_desc, &file_info,
normalized_name, exists);
fmt::println("{}|{}", utils::string::to_utf8(file_name), exists);
if (ret == STATUS_SUCCESS) {
if (exists == 0U) {
#if defined(_WIN32)
this->set_client_id(file_desc, client_id);
this->set_client_id(file_desc, client_id);
#else // !defined(_WIN32)
this->set_client_id(
static_cast<native_handle>(
reinterpret_cast<std::uintptr_t>(file_desc)),
client_id);
this->set_client_id(
static_cast<native_handle>(
reinterpret_cast<std::uintptr_t>(file_desc)),
client_id);
#endif // defined(_WIN32)
}
response.encode(file_desc);
response.encode(file_info);
response.encode(normalized_name);

View File

@ -1124,8 +1124,6 @@ auto remote_server::winfsp_create(PWSTR file_name, UINT32 create_options,
auto file_path = construct_path(relative_path);
exists = static_cast<BOOLEAN>(utils::file::file{file_path}.exists() ||
utils::file::directory{file_path}.exists());
fmt::println("{}|{}", file_path, exists);
auto ret{static_cast<packet::error_type>(STATUS_SUCCESS)};
if (exists == 0U) {
if ((create_options & FILE_DIRECTORY_FILE) != 0U) {