copy
copy copied to clipboard
Support PreserveTimes for symlinks on Unix
This is an addition to https://github.com/otiai10/copy/pull/31 - While symlink timestamps cannot be set universally (neither at time of link creation nor by a simple call to os.Chtimes()
) they can be set on Unix making use of unix.Lutimes()
. This PR extends the existing PreserveTime
option by that, transferring the original link timestamp(s) to the newly created one if the option is set.
For unsupported architectures, a stub is provided similar to already existing ones (e.g. for ownership preservation).
Codecov Report
Merging #83 (55416e9) into main (be95711) will increase coverage by
1.43%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## main #83 +/- ##
==========================================
+ Coverage 77.40% 78.83% +1.43%
==========================================
Files 13 15 +2
Lines 177 189 +12
==========================================
+ Hits 137 149 +12
Misses 20 20
Partials 20 20
Impacted Files | Coverage Δ | |
---|---|---|
copy.go | 76.47% <100.00%> (+0.96%) |
:arrow_up: |
preserve_ltimes.go | 100.00% <100.00%> (ø) |
|
preserve_ltimes_x.go | 100.00% <100.00%> (ø) |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
@otiai10 It seems that a recent upstream change breaks the GopherJS Pipeline (unrelated to this issue): https://github.com/gopherjs/gopherjs/commit/f754ef8bf776018e09b416319246ed4b72365832
What's your preference, should I open an independent issue for that? Do you want to fix it on main
directly for a rebase?
Thank you, @fako1024
open an independent issue for that
This would be super cool! Thank you so much ;)
Thank you for everything!