fix invalid error
Some checks are pending
BlockStorage/repertory/pipeline/head Build queued...

This commit is contained in:
Scott E. Graves 2024-12-29 17:43:09 -06:00
parent 4cb3e22308
commit 0c41a3309e
2 changed files with 4 additions and 10 deletions

View File

@ -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<directory_iterator>;
[[nodiscard]] auto
get_directory(std::uint64_t handle) -> std::shared_ptr<directory_iterator>;
[[nodiscard]] auto remove_directory(const std::string &api_path)
auto remove_directory(const std::string &api_path)
-> std::shared_ptr<directory_iterator>;
void remove_directory(std::uint64_t handle);

View File

@ -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);