void-packages/srcpkgs/kyua/patches/patch.diff

17 lines
671 B
Diff

diff --git a/utils/fs/operations.cpp b/utils/fs/operations.cpp
index a4461c1..bdc23b9 100644
--- utils/fs/operations.cpp
+++ utils/fs/operations.cpp
@@ -356,7 +356,10 @@ recursive_cleanup(const fs::path& current_path, const struct ::stat& parent_sb)
{
bool ok = true;
- ok &= try_unprotect(current_path);
+ // Weakening the protections of a file is just a best-effort operation.
+ // If this fails, we may still be able to do the file/directory removal
+ // later on, so ignore any failures from try_unprotect().
+ (void)try_unprotect(current_path);
const optional< struct ::stat > current_sb = try_stat(current_path);
if (!current_sb)