This commit is contained in:
		| @@ -620,8 +620,8 @@ auto remote_server::fuse_opendir(const char *path, remote::file_handle &handle) | ||||
|   errno = ENOENT; | ||||
|  | ||||
|   if (utils::file::is_directory(file_path)) { | ||||
|     auto list = drive_.get_directory_items(utils::path::create_api_path(path)); | ||||
|     auto iter = std::make_shared<directory_iterator>(std::move(list)); | ||||
|     auto iter = std::make_shared<directory_iterator>( | ||||
|         drive_.get_directory_items(utils::path::create_api_path(path))); | ||||
|  | ||||
|     handle = get_next_handle(); | ||||
|     directory_cache_.set_directory(path, handle, iter); | ||||
| @@ -1355,8 +1355,7 @@ auto remote_server::winfsp_read_directory(PVOID file_desc, PWSTR /*pattern*/, | ||||
|   if (ret == STATUS_SUCCESS) { | ||||
|     const auto api_path = construct_api_path( | ||||
|         get_open_file_path(static_cast<native_handle>(handle))); | ||||
|     auto list = drive_.get_directory_items(api_path); | ||||
|     directory_iterator iterator(std::move(list)); | ||||
|     directory_iterator iterator(drive_.get_directory_items(api_path)); | ||||
|     auto offset = marker == nullptr | ||||
|                       ? 0 | ||||
|                       : iterator.get_next_directory_offset( | ||||
| @@ -1567,8 +1566,8 @@ auto remote_server::json_create_directory_snapshot( | ||||
|   errno = ENOENT; | ||||
|  | ||||
|   if (utils::file::is_directory(file_path)) { | ||||
|     auto list = drive_.get_directory_items(api_path); | ||||
|     auto iter = std::make_shared<directory_iterator>(std::move(list)); | ||||
|     auto iter = std::make_shared<directory_iterator>( | ||||
|         drive_.get_directory_items(api_path)); | ||||
|     auto handle = get_next_handle(); | ||||
|     directory_cache_.set_directory(api_path, handle, iter); | ||||
|  | ||||
|   | ||||
| @@ -338,8 +338,8 @@ auto remote_server::fuse_opendir(const char *path, remote::file_handle &handle) | ||||
|   errno = ENOENT; | ||||
|  | ||||
|   if (::PathIsDirectoryW(unicode_file_path.c_str()) != 0) { | ||||
|     auto list = drive_.get_directory_items(utils::path::create_api_path(path)); | ||||
|     auto iter = std::make_shared<directory_iterator>(std::move(list)); | ||||
|     auto iter = std::make_shared<directory_iterator>( | ||||
|         drive_.get_directory_items(utils::path::create_api_path(path))); | ||||
|  | ||||
|     handle = get_next_handle(); | ||||
|     directory_cache_.set_directory(path, handle, iter); | ||||
| @@ -827,8 +827,8 @@ auto remote_server::json_create_directory_snapshot( | ||||
|   errno = ENOENT; | ||||
|  | ||||
|   if (utils::file::is_directory(file_path)) { | ||||
|     auto list = drive_.get_directory_items(utils::path::create_api_path(path)); | ||||
|     auto iter = std::make_shared<directory_iterator>(std::move(list)); | ||||
|     auto iter = std::make_shared<directory_iterator>( | ||||
|         drive_.get_directory_items(utils::path::create_api_path(path))); | ||||
|     auto handle = get_next_handle(); | ||||
|     directory_cache_.set_directory(path, handle, iter); | ||||
|  | ||||
| @@ -1213,8 +1213,7 @@ auto remote_server::winfsp_read_directory(PVOID file_desc, PWSTR /*pattern*/, | ||||
|   if (get_open_info(file_desc, ofi)) { | ||||
|     const auto api_path = | ||||
|         utils::path::create_api_path(ofi.path.substr(mount_location_.size())); | ||||
|     auto items = drive_.get_directory_items(api_path); | ||||
|     directory_iterator iter(std::move(items)); | ||||
|     directory_iterator iter(drive_.get_directory_items(api_path)); | ||||
|     auto offset = marker == nullptr | ||||
|                       ? 0 | ||||
|                       : iter.get_next_directory_offset( | ||||
|   | ||||
		Reference in New Issue
	
	Block a user