Skip to content

Conversation

@JoergBudi
Copy link
Contributor

The fix for https://issues.apache.org/jira/browse/IO-859 introduced this regression bug https://issues.apache.org/jira/browse/IO-874, which is triggered when a broken/dangling symlink is tried to be deleted.
Before 2.16.1, FileUtils.forceDelete() deleted broken/dangling symbolic links successfully, since then it throws FileNotFoundException. With this fix a FileNotFoundException is only thrown, when the target file does not exist AND is not a symlink. 2 tests have been added to check that a broken link is deleted and that an ok link only deletes the link but not the file itself (increase test coverage).

Note: This is my first contribution. I just signed the ICLA as JoergBudi@gmx.de, shared it with secretary@apache.org and got a receipt, but haven't got an apacheid yet (my preferred apacheid would be jbudi , but I am in no hurry in case that is handed out only after more contribs).

@JoergBudi JoergBudi changed the title [WIP] [IO-874] FileUtils.forceDelete can delete a broken symlink again [IO-874] FileUtils.forceDelete can delete a broken symlink again Jun 30, 2025
@garydgregory garydgregory merged commit 5754cc5 into apache:master Jul 1, 2025
18 of 21 checks passed
@garydgregory
Copy link
Member

Merged. Ty @JoergBudi !

dongjoon-hyun added a commit to apache/spark that referenced this pull request Jul 30, 2025
### What changes were proposed in this pull request?

This PR aims to upgrade `commons-io` to 2.20.0 for Apache Spark 4.1.0.

### Why are the changes needed?

To bring the latest bug fixes.
- https://commons.apache.org/proper/commons-io/changes.html#a2.20.0 (2025-07-13)
  - apache/commons-io#756

### Does this PR introduce _any_ user-facing change?

No behavior change.

### How was this patch tested?

Pass the CIs.

### Was this patch authored or co-authored using generative AI tooling?

No.

Closes #51730 from dongjoon-hyun/SPARK-53024.

Authored-by: Dongjoon Hyun <dongjoon@apache.org>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants