Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Safe copy recursively #1235

Merged
merged 3 commits into from
Jan 28, 2019
Merged

Safe copy recursively #1235

merged 3 commits into from
Jan 28, 2019

Conversation

sschuberth
Copy link
Member

@sschuberth sschuberth commented Jan 25, 2019

Please have a look at the individual commit messages for the details.


This change is Reviewable

As of a52a984 we use File.delete() which really deletes the junction
instead of unlinking it and turning it into an empty directory.

In any case the contents of the link target are not deleted.

Signed-off-by: Sebastian Schuberth <sebastian.schuberth@here.com>
@sschuberth
Copy link
Member Author

@msohn, mind trying this branch?

Because Kotlin's File.copyRecursively() might run into an endless loop
for links that point to the parent directory, see

https://youtrack.jetbrains.com/issue/KT-29508

Signed-off-by: Sebastian Schuberth <sebastian.schuberth@here.com>
@msohn
Copy link

msohn commented Jan 26, 2019

Using this version of ort analyzing gardener writes an analyzer result file.
This PR seems to fix the first error I mentioned in issue #1233. Though it still raises the other 2 errors about running dep init in some tmp paths which are not residing under GOPATH. I posted the details in issue #1233.

safeCopyRecursively() can handle links whose target is the parent
directory like at

https://github.com/gardener/gardener/tree/ee3872ddde8fdc768e33bce9efd2638aefc36cce/vendor/github.com/coreos/etcd/cmd

This fixes one part of issue #1233.

Signed-off-by: Sebastian Schuberth <sebastian.schuberth@here.com>
@sschuberth sschuberth merged commit f608ed7 into master Jan 28, 2019
@sschuberth sschuberth deleted the safe-copy-recursively branch January 28, 2019 10:43
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.

3 participants