-
-
Notifications
You must be signed in to change notification settings - Fork 115
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
Support PreserveTimes for symlinks on Unix #83
Conversation
Codecov Report
@@ 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
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Getting Lstat in onsymlink
could be inefficient operation for platforms who don't even need it.
@otiai10 It seems that a recent upstream change breaks the GopherJS Pipeline (unrelated to this issue): What's your preference, should I open an independent issue for that? Do you want to fix it on |
Thank you, @fako1024
This would be super cool! Thank you so much ;) |
Thank you for everything! |
This is an addition to #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 ofunix.Lutimes()
. This PR extends the existingPreserveTime
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).