Compare commits
2 Commits
f2f9e8fd15
...
f1e82d8f9f
Author | SHA1 | Date | |
---|---|---|---|
f1e82d8f9f | |||
f5c4aebdac |
@ -8,6 +8,7 @@
|
|||||||
* ~~\#21 [Unit Test] Complete WinFSP unit tests~~
|
* ~~\#21 [Unit Test] Complete WinFSP unit tests~~
|
||||||
* ~~\#22 [Unit Test] Complete FUSE unit tests~~
|
* ~~\#22 [Unit Test] Complete FUSE unit tests~~
|
||||||
* ~~\#33 Complete initial v2.0 documentation~~
|
* ~~\#33 Complete initial v2.0 documentation~~
|
||||||
|
* \#42 [bug] Remote mount directory listing on Windows connected to Linux is failing
|
||||||
|
|
||||||
### Changes from v2.0.5-rc
|
### Changes from v2.0.5-rc
|
||||||
|
|
||||||
|
@ -1390,7 +1390,7 @@ auto remote_server::winfsp_read_directory(PVOID file_desc, PWSTR /*pattern*/,
|
|||||||
|
|
||||||
item_list.clear();
|
item_list.clear();
|
||||||
|
|
||||||
const auto handle = reinterpret_cast<remote::file_handle>(file_desc);
|
auto handle = reinterpret_cast<remote::file_handle>(file_desc);
|
||||||
auto ret = static_cast<packet::error_type>(
|
auto ret = static_cast<packet::error_type>(
|
||||||
has_open_info(static_cast<native_handle>(handle), STATUS_INVALID_HANDLE));
|
has_open_info(static_cast<native_handle>(handle), STATUS_INVALID_HANDLE));
|
||||||
if (ret == STATUS_SUCCESS) {
|
if (ret == STATUS_SUCCESS) {
|
||||||
@ -1680,29 +1680,30 @@ auto remote_server::json_release_directory_snapshot(
|
|||||||
}
|
}
|
||||||
|
|
||||||
auto remote_server::update_to_windows_format(json &item) -> json & {
|
auto remote_server::update_to_windows_format(json &item) -> json & {
|
||||||
const auto api_path = item["path"].get<std::string>();
|
auto api_path = item[JSON_API_PATH].get<std::string>();
|
||||||
item["meta"][META_ACCESSED] = std::to_string(
|
item[JSON_META][META_ACCESSED] = std::to_string(
|
||||||
utils::string::to_uint64(empty_as_zero(item["meta"][META_ACCESSED])));
|
utils::string::to_uint64(empty_as_zero(item[JSON_META][META_ACCESSED])));
|
||||||
item["meta"][META_CREATION] = std::to_string(
|
item[JSON_META][META_CREATION] = std::to_string(
|
||||||
utils::string::to_uint64(empty_as_zero(item["meta"][META_CREATION])));
|
utils::string::to_uint64(empty_as_zero(item[JSON_META][META_CREATION])));
|
||||||
item["meta"][META_MODIFIED] = std::to_string(
|
item[JSON_META][META_MODIFIED] = std::to_string(
|
||||||
utils::string::to_uint64(empty_as_zero(item["meta"][META_MODIFIED])));
|
utils::string::to_uint64(empty_as_zero(item[JSON_META][META_MODIFIED])));
|
||||||
|
|
||||||
if (item["meta"][META_WRITTEN].empty() ||
|
if (item[JSON_META][META_WRITTEN].empty() ||
|
||||||
(item["meta"][META_WRITTEN].get<std::string>() == "0") ||
|
(item[JSON_META][META_WRITTEN].get<std::string>() == "0") ||
|
||||||
(item["meta"][META_WRITTEN].get<std::string>() ==
|
(item[JSON_META][META_WRITTEN].get<std::string>() ==
|
||||||
std::to_string(utils::time::WIN32_TIME_CONVERSION))) {
|
std::to_string(utils::time::WIN32_TIME_CONVERSION))) {
|
||||||
drive_.set_item_meta(api_path, META_WRITTEN,
|
drive_.set_item_meta(api_path, META_WRITTEN,
|
||||||
item["meta"][META_MODIFIED].get<std::string>());
|
item[JSON_META][META_MODIFIED].get<std::string>());
|
||||||
item["meta"][META_WRITTEN] = item["meta"][META_MODIFIED];
|
item[JSON_META][META_WRITTEN] = item[JSON_META][META_MODIFIED];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item["meta"][META_ATTRIBUTES].empty()) {
|
if (item[JSON_META][META_ATTRIBUTES].empty()) {
|
||||||
item["meta"][META_ATTRIBUTES] =
|
item[JSON_META][META_ATTRIBUTES] =
|
||||||
item["directory"].get<bool>() ? std::to_string(FILE_ATTRIBUTE_DIRECTORY)
|
item[JSON_DIRECTORY].get<bool>()
|
||||||
|
? std::to_string(FILE_ATTRIBUTE_DIRECTORY)
|
||||||
: std::to_string(FILE_ATTRIBUTE_ARCHIVE);
|
: std::to_string(FILE_ATTRIBUTE_ARCHIVE);
|
||||||
drive_.set_item_meta(api_path, META_ATTRIBUTES,
|
drive_.set_item_meta(api_path, META_ATTRIBUTES,
|
||||||
item["meta"][META_ATTRIBUTES].get<std::string>());
|
item[JSON_META][META_ATTRIBUTES].get<std::string>());
|
||||||
}
|
}
|
||||||
|
|
||||||
return item;
|
return item;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user