refactor
This commit is contained in:
parent
03dd9ee579
commit
50e7fb612c
@ -1228,7 +1228,8 @@ auto remote_server::winfsp_flush(PVOID file_desc, remote::file_info *file_info)
|
||||
has_open_info(static_cast<native_handle>(handle), STATUS_INVALID_HANDLE));
|
||||
if (ret == STATUS_SUCCESS) {
|
||||
ret = (fsync(static_cast<native_handle>(handle)) < 0)
|
||||
? utils::unix_error_to_windows(errno)
|
||||
? static_cast<packet::error_type>(
|
||||
utils::unix_error_to_windows(errno))
|
||||
: populate_file_info(construct_api_path(get_open_file_path(
|
||||
static_cast<native_handle>(handle))),
|
||||
*file_info);
|
||||
@ -1346,8 +1347,9 @@ auto remote_server::winfsp_open(
|
||||
}
|
||||
}
|
||||
|
||||
auto ret = static_cast<packet::error_type>(
|
||||
utils::unix_error_to_windows((res < 0) ? errno : 0));
|
||||
auto ret =
|
||||
static_cast<packet::error_type>(utils::static_cast<packet::error_type>(
|
||||
unix_error_to_windows((res < 0)) ? errno : 0));
|
||||
RAISE_REMOTE_FUSE_SERVER_EVENT(function_name, file_path, ret);
|
||||
return ret;
|
||||
}
|
||||
@ -1590,7 +1592,9 @@ auto remote_server::winfsp_set_file_size(
|
||||
? ftruncate(static_cast<native_handle>(handle),
|
||||
static_cast<off_t>(new_size))
|
||||
: 0;
|
||||
ret = ((res < 0) ? utils::unix_error_to_windows(errno) : 0);
|
||||
ret = ((res < 0) ? static_cast<packet::error_type>(
|
||||
utils::unix_error_to_windows(errno))
|
||||
: 0);
|
||||
if (ret == 0) {
|
||||
ret = populate_file_info(construct_api_path(get_open_file_path(
|
||||
static_cast<native_handle>(handle))),
|
||||
|
Loading…
x
Reference in New Issue
Block a user