Repository navigation
Conversation
added 3 commits
August 24, 2026 22:16
…-symlink-directory
Check the directory entry with NOFOLLOW_LINKS so the test verifies that deleteQuietly removes the symlink itself while preserving its target.
Author
|
This PR is ready for review. The remaining GitHub Actions workflows are awaiting maintainer approval; could a maintainer please approve them when convenient? Thank you. |
Member
|
This is in my queue, I should be able to get to it this week. |
Author
|
Quick update: the Java CI, CodeQL, and Dependency Review runs for the current head (86655bd) expired while awaiting maintainer approval, so no jobs ran. Could you let me know whether you would like me to update the branch to trigger fresh runs when someone is available to approve them? Thank you. |
Merge current master to reuse isLinkLikeDirectory. Add a cross-platform link-like attribute regression and a Windows junction regression that preserves target contents. Assisted-By: OpenAI Codex
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Thanks for your contribution to Apache Commons! Your help is appreciated!
Before you push a pull request, review this list:
mvn; that'smvnon the command line by itself.Summary
FileUtils.deleteQuietly(File)now avoids recursively cleaning the target of a directory symbolic link or a Windows junction. It uses the sameisLinkLikeDirectorypredicate asdeleteDirectory()on current master. The link entry can be deleted without deleting files in the target directory.Change
The branch was updated to current master to reuse its junction-aware predicate.
Tests
deleteQuietly()removes the link while preserving its target.!isSymlink(file)guard and passes with the new guard.mklink /Jand checks thatdeleteQuietly()removes the junction while preserving the target and its file.On macOS with OpenJDK 21 and Maven 3.9.9, the default Maven build passed: 7,381 tests, 0 failures, 0 errors, and 38 skipped. Coverage, Checkstyle, SpotBugs, PMD, license, and Javadoc checks passed. The Windows-only regression was skipped locally and still needs a Windows CI run. The new upstream GitHub Actions runs currently require maintainer approval.
AI tooling disclosure
An OpenAI coding assistant helped identify the original candidate, refine the symbolic-link regression, update this PR for junction handling, and run local validation. The Windows-specific test has not yet run in this local environment.