Skip to content

Commit

Permalink
fix(artifact/gitrepo): resolve symlink clean error (backport #994) (#…
Browse files Browse the repository at this point in the history
…1009)

* fix(artifact/gitrepo): resolve symlink clean error (#994)

Bump `commons-io` to `2.11.0` which fixed the cleaning
directory behavior when there is symlink.

In the version `2.7.0` the delete directory will first check
if the file exists with `Files.exists`, then issue a deleting with
`File.deleteIfExists`. However when it's a symlink, the default
behavior for `Files.exists` is to follow link, if the file/directory
the symlink pointing to has been deleted, the symlink itself will not
be deleted, this will causes error with `deleteDirectory` when there
is still symlink left in the directory.

In the newer version will add `NOFOLLOW_LINK` option on the `File.exists`
check, therefore it will work as expected.

(cherry picked from commit c2aabe6)

# Conflicts:
#	spinnaker-dependencies/spinnaker-dependencies.gradle

* fix(backport): Fixes conflict on backport

---------

Co-authored-by: Wei Tie <[email protected]>
Co-authored-by: Jason <[email protected]>
  • Loading branch information
3 people authored Feb 14, 2023
1 parent fc06b89 commit bc53b32
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spinnaker-dependencies/spinnaker-dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ dependencies {
api("com.sun.xml.bind:jaxb-impl:2.3.2")
api("com.vdurmont:semver4j:3.1.0")
api("commons-configuration:commons-configuration:1.8")
api("commons-io:commons-io:2.5")
api("commons-io:commons-io:2.11.0")
// CVE's in 3.2.1
api("commons-collections:commons-collections:[3.2.2,3.3)")
api("de.danielbechler:java-object-diff:0.95")
Expand Down

0 comments on commit bc53b32

Please sign in to comment.