Compare commits

...

2 Commits

Author SHA1 Message Date
dab8c61f87 debugging
Some checks are pending
BlockStorage/repertory/pipeline/head Build queued...
2025-04-04 12:36:02 -05:00
e0cf58b01e debugging 2025-04-04 12:24:17 -05:00
3 changed files with 13 additions and 8 deletions

View File

@ -142,6 +142,7 @@ 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 defined(_WIN32)
this->set_client_id(file_desc, client_id);
@ -589,8 +590,9 @@ public:
DECODE_OR_RETURN(request, flags);
remote::file_handle handle{};
if ((ret = this->fuse_create(path.data(), mode, flags, handle)) >=
0) {
ret = this->fuse_create(path.data(), mode, flags, handle);
if (ret >= 0) {
#if defined(_WIN32)
this->set_compat_client_id(handle, client_id);
#else // !defined(_WIN32)
@ -846,7 +848,8 @@ public:
DECODE_OR_RETURN(request, flags);
remote::file_handle handle;
if ((ret = this->fuse_open(path.c_str(), flags, handle)) >= 0) {
ret = this->fuse_open(path.c_str(), flags, handle);
if (ret >= 0) {
#if defined(_WIN32)
this->set_compat_client_id(handle, client_id);
#else // !defined(_WIN32)
@ -867,7 +870,8 @@ public:
DECODE_OR_RETURN(request, path);
remote::file_handle handle{0};
if ((ret = this->fuse_opendir(path.c_str(), handle)) >= 0) {
ret = this->fuse_opendir(path.c_str(), handle);
if (ret >= 0) {
this->add_directory(client_id, handle);
response.encode(handle);
}

View File

@ -1122,11 +1122,12 @@ auto remote_server::winfsp_create(PWSTR file_name, UINT32 create_options,
auto relative_path = utils::string::to_utf8(file_name);
auto file_path = construct_path(relative_path);
exists = utils::file::file{file_path}.exists() ||
utils::file::directory{file_path}.exists();
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 (not exists) {
if (exists == 0U) {
if ((create_options & FILE_DIRECTORY_FILE) != 0U) {
attributes |= FILE_ATTRIBUTE_DIRECTORY;
} else {

View File

@ -201,11 +201,11 @@ auto remote_client::winfsp_create(PWSTR file_name, UINT32 create_options,
#if defined(_WIN32)
else {
ret = STATUS_OBJECT_NAME_COLLISION;
::SetLastError(ERROR_FILE_EXISTS);
}
#endif // defined(_WIN32)
}
fmt::println("{}|{}|{}", file_name, exists, ret);
return ret;
}