Repository navigation
[IO-879] Restore read-only state after failed deletion - #881
efegokdemir wants to merge 6 commits into
Conversation
Signed-off-by: Efe Gökdemir <efe@rexcode.co.uk>
|
One failure case appears to change the file state: AI assistance used. |
|
@efegokdemir Please rebase on git master. |
Restore the original file read-only state and parent POSIX permissions when deletion fails. Assisted-By: Codex
Restore each file and parent POSIX permissions independently, while retaining the original deletion failure if cleanup also fails. Add regressions for successful deletion, failed deletion and restoration errors. Assisted-By: OpenAI Codex
Attempt file and parent restoration independently and suppress restoration errors on the original deletion failure. Keep restoration errors visible after a successful deletion, with regression coverage for both paths. Assisted-By: OpenAI Codex
Linux can expose DOS attributes as well as POSIX permissions. Select the existing POSIX fallback in the successful-deletion visitor regressions, while retaining real permission changes and deletion. Verify the temporary writable parent and preserve the exact restored-permission assertions. No production behavior changes. Assisted-By: OpenAI Codex
|
@efegokdemir
PR #927 reuses DOS restoration logic across the deletion paths, preserves existing POSIX traversal behavior, and avoids clearing DOS state when its original value cannot be read. The tests in PR #927 verify that the flag is cleared during the failing deletion attempt and restored afterward. Thank you again for the contribution and for helping move this issue forward. |
Summary
Fixes IO-879 by restoring the file's original read-only state and the parent directory's POSIX permissions after an override-enabled deletion attempt. File and parent restoration are attempted independently, and restoration failures are suppressed on the original deletion exception.
Changes
Testing
mvn -B -ntp verify: 7,278 tests, 0 failures or errors, 41 skipped; JaCoCo passed.mvn -B -ntp checkstyle:check apache-rat:check: 0 Checkstyle violations; RAT passed.git diff --check: passed.AI assistance: OpenAI Codex assisted with implementation and regression tests.