efegokdemir opened a new pull request, #881: URL: https://github.com/apache/commons-io/pull/881
## Summary Fixes IO-879 by restoring a file's read-only state when an override-enabled deletion attempt fails. ## Changes - Restore the read-only attribute in `PathUtils.deleteFile` when the file remains after a failed deletion. - Apply the same fail-safe behavior to `DeletingPathVisitor` and `CleaningPathVisitor`. - Add a Windows-focused regression test covering a read-only file in a read-only parent directory. ## Testing - `mvn -pl . -Dtest=PathUtilsDeleteFileTest -Dsurefire.failIfNoSpecifiedTests=false test -q` — passed locally: 8 tests, 1 skipped (Windows-only regression skipped on macOS). - `mvn -DskipTests compile -q` — passed. - `git diff --check` — passed. - Full `mvn test` — not completed: the suite continued running without producing new reports for several minutes on macOS/JDK 27, so the local process was stopped rather than reported as passing. - The Windows-specific regression requires Windows CI and was not runnable on this Mac. ## Notes The change preserves the original deletion exception and only restores the attribute when the path still exists. AI assistance was used during investigation and implementation; the submitter reviewed the changed lines and test results. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
