Compare commits
No commits in common. "dab8c61f87d620c28a93c2e7acdddb8abf1d3150" and "281d3758e01d1128b8687d84cba6fc36450189f4" have entirely different histories.
dab8c61f87
...
281d3758e0
@ -142,7 +142,6 @@ 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);
|
||||
@ -590,9 +589,8 @@ public:
|
||||
DECODE_OR_RETURN(request, flags);
|
||||
|
||||
remote::file_handle handle{};
|
||||
|
||||
ret = this->fuse_create(path.data(), mode, flags, handle);
|
||||
if (ret >= 0) {
|
||||
if ((ret = this->fuse_create(path.data(), mode, flags, handle)) >=
|
||||
0) {
|
||||
#if defined(_WIN32)
|
||||
this->set_compat_client_id(handle, client_id);
|
||||
#else // !defined(_WIN32)
|
||||
@ -848,8 +846,7 @@ public:
|
||||
DECODE_OR_RETURN(request, flags);
|
||||
|
||||
remote::file_handle handle;
|
||||
ret = this->fuse_open(path.c_str(), flags, handle);
|
||||
if (ret >= 0) {
|
||||
if ((ret = this->fuse_open(path.c_str(), flags, handle)) >= 0) {
|
||||
#if defined(_WIN32)
|
||||
this->set_compat_client_id(handle, client_id);
|
||||
#else // !defined(_WIN32)
|
||||
@ -870,8 +867,7 @@ public:
|
||||
DECODE_OR_RETURN(request, path);
|
||||
|
||||
remote::file_handle handle{0};
|
||||
ret = this->fuse_opendir(path.c_str(), handle);
|
||||
if (ret >= 0) {
|
||||
if ((ret = this->fuse_opendir(path.c_str(), handle)) >= 0) {
|
||||
this->add_directory(client_id, handle);
|
||||
response.encode(handle);
|
||||
}
|
||||
|
@ -1122,12 +1122,11 @@ 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 = static_cast<BOOLEAN>(utils::file::file{file_path}.exists() ||
|
||||
utils::file::directory{file_path}.exists());
|
||||
fmt::println("{}|{}", file_path, exists);
|
||||
exists = utils::file::file{file_path}.exists() ||
|
||||
utils::file::directory{file_path}.exists();
|
||||
|
||||
auto ret{static_cast<packet::error_type>(STATUS_SUCCESS)};
|
||||
if (exists == 0U) {
|
||||
if (not exists) {
|
||||
if ((create_options & FILE_DIRECTORY_FILE) != 0U) {
|
||||
attributes |= FILE_ATTRIBUTE_DIRECTORY;
|
||||
} else {
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user