diff --git a/repertory/librepertory/include/drives/directory_cache.hpp b/repertory/librepertory/include/drives/directory_cache.hpp index a89b6faf..babf6bd6 100644 --- a/repertory/librepertory/include/drives/directory_cache.hpp +++ b/repertory/librepertory/include/drives/directory_cache.hpp @@ -60,10 +60,10 @@ public: void execute_action(const std::string &api_path, const execute_callback &execute); - [[nodiscard]] auto get_directory(std::uint64_t handle) - -> std::shared_ptr; + [[nodiscard]] auto + get_directory(std::uint64_t handle) -> std::shared_ptr; - [[nodiscard]] auto remove_directory(const std::string &api_path) + auto remove_directory(const std::string &api_path) -> std::shared_ptr; void remove_directory(std::uint64_t handle); diff --git a/repertory/librepertory/src/drives/fuse/remotefuse/remote_server.cpp b/repertory/librepertory/src/drives/fuse/remotefuse/remote_server.cpp index 1bbddc5d..4cf8ca72 100644 --- a/repertory/librepertory/src/drives/fuse/remotefuse/remote_server.cpp +++ b/repertory/librepertory/src/drives/fuse/remotefuse/remote_server.cpp @@ -774,13 +774,7 @@ auto remote_server::fuse_rmdir(const char *path) -> packet::error_type { const auto file_path = construct_path(path); const auto res = rmdir(file_path.c_str()); if (res == 0) { - auto iter = - directory_cache_.remove_directory(utils::path::create_api_path(path)); - if (iter == nullptr) { - utils::error::raise_error( - function_name, - "unexpected nullptr for directory iterator|sp|" + file_path); - } + directory_cache_.remove_directory(utils::path::create_api_path(path)); } auto ret = ((res < 0) ? -errno : 0); RAISE_REMOTE_FUSE_SERVER_EVENT(function_name, file_path, ret);