From: Matan Breizman Date: Tue, 10 Aug 2021 17:21:38 +0000 (+0000) Subject: rgw: fix install packages function X-Git-Tag: v17.1.0~1049^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=7eef25c04b5e1d391714146ac0d717afdc617844;p=ceph.git rgw: fix install packages function remove_all() doesn't return bool, instead it returns static_cast(-1) on error. Signed-off-by: Matan Breizman --- diff --git a/src/rgw/rgw_lua.cc b/src/rgw/rgw_lua.cc index bd08f06bcd99..46c194db9870 100644 --- a/src/rgw/rgw_lua.cc +++ b/src/rgw/rgw_lua.cc @@ -198,7 +198,8 @@ int install_packages(const DoutPrefixProvider *dpp, rgw::sal::Store* store, opti // luarocks directory cleanup std::error_code ec; const auto& luarocks_path = store->get_luarocks_path(); - if (!std::filesystem::remove_all(luarocks_path, ec) && + if (std::filesystem::remove_all(luarocks_path, ec) + == static_cast(-1) && ec != std::errc::no_such_file_or_directory) { output.append("failed to clear luarock directory: "); output.append(ec.message());