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

Fix symlinks #56

Closed
wants to merge 1 commit into from
Closed

Fix symlinks #56

wants to merge 1 commit into from

Conversation

benmoss
Copy link

@benmoss benmoss commented Apr 9, 2021

Fixes #32

  • Deep symlinks will properly be resolved with filepath.EvalSymlinks
  • Shallow relative symlinks will error if they are broken because the destination is no longer valid relative. This can happen if the copy operation doesn't include the symlink target.
  • Shallow absolute symlinks will continue to point to their original destination.

- Deep symlinks will properly be resolved with filepath.EvalSymlinks
- Shallow relative symlinks will error if they are broken because the destination
is no longer valid relative. This can happen if the copy operation
doesn't include the symlink target.
- Shallow absolute symlinks will continue to point to their original
destination.
@codecov-io
Copy link

codecov-io commented Apr 9, 2021

Codecov Report

Merging #56 (7e84071) into main (51bf83a) will decrease coverage by 0.26%.
The diff coverage is 85.71%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #56      +/-   ##
==========================================
- Coverage   83.96%   83.70%   -0.27%     
==========================================
  Files           9        7       -2     
  Lines         131      135       +4     
==========================================
+ Hits          110      113       +3     
  Misses         11       11              
- Partials       10       11       +1     
Impacted Files Coverage Δ
test_setup.go 80.00% <66.66%> (-20.00%) ⬇️
copy.go 83.83% <100.00%> (+2.98%) ⬆️
stat_times_windows.go
copy_namedpipes_windows.go
test_setup_windows.go
preserve_times.go 50.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 51bf83a...7e84071. Read the comment docs.

@benmoss
Copy link
Author

benmoss commented Apr 9, 2021

Not sure why test_setup.go is in its own file, but it should at the very least be setup_test.go so that it doesn't affect code coverage results like this.

@benmoss benmoss closed this Apr 9, 2021
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.

copy.Deep does not follow multiple levels of symbolic links
2 participants