From dab8c61f87d620c28a93c2e7acdddb8abf1d3150 Mon Sep 17 00:00:00 2001 From: "Scott E. Graves" Date: Fri, 4 Apr 2025 12:36:02 -0500 Subject: [PATCH] debugging --- .../include/drives/remote/remote_server_base.hpp | 13 ++++++++----- .../drives/winfsp/remotewinfsp/remote_client.cpp | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/repertory/librepertory/include/drives/remote/remote_server_base.hpp b/repertory/librepertory/include/drives/remote/remote_server_base.hpp index 91783588..da2f54c3 100644 --- a/repertory/librepertory/include/drives/remote/remote_server_base.hpp +++ b/repertory/librepertory/include/drives/remote/remote_server_base.hpp @@ -142,7 +142,7 @@ public: granted_access, attributes, allocation_size, &file_desc, &file_info, normalized_name, exists); - fmt::println("{}|{}", file_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); @@ -590,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) @@ -847,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) @@ -868,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); } diff --git a/repertory/librepertory/src/drives/winfsp/remotewinfsp/remote_client.cpp b/repertory/librepertory/src/drives/winfsp/remotewinfsp/remote_client.cpp index 00fc9520..6a3db6c9 100644 --- a/repertory/librepertory/src/drives/winfsp/remotewinfsp/remote_client.cpp +++ b/repertory/librepertory/src/drives/winfsp/remotewinfsp/remote_client.cpp @@ -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; }