dajiaohuang commented on PR #881: URL: https://github.com/apache/commons-io/pull/881#issuecomment-6393023676
One failure case appears to change the file state: `readOnlyCleared` records that the override branch ran, not that the file was read-only beforehand. If a writable file is passed with `OVERRIDE_READ_ONLY` and deletion fails, the `finally` block calls `setReadOnly(file, true)`, making the previously writable file read-only. Could the original read-only state (or exact attributes) be captured and restored, with a regression test for a writable file whose deletion fails? AI assistance used. -- 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]
