remove_all() doesn't return bool,
instead it returns static_cast<std::uintmax_t>(-1) on error.
Signed-off-by: Matan Breizman <Matan.Brz@gmail.com>
// 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<std::uintmax_t>(-1) &&
ec != std::errc::no_such_file_or_directory) {
output.append("failed to clear luarock directory: ");
output.append(ec.message());