-
Notifications
You must be signed in to change notification settings - Fork 773
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
Add option to preserve timestamps #141
Conversation
This looks really good, thank you!
|
I'm not sure if I check the dates correctly - I haven't really used mocha... probably the date check via I cloned the repo today and used the master branch. I didn't see the copy tests, so I just created one like |
The formatting in my last comment butchered the path names, the copy tests were moved to |
Any preference on where I should put the fixtures? Or shall I only test the copy of a single file? |
Just be sure to reference or rebase against the latest master. If you need to create new fixtures, that's fine as well. Just put them in |
c9404aa
to
2f7fb38
Compare
Okay, I hope this will work out now. I've changed the equality check of the modification time / access time. I'm testing it on Node 0.12.4 on a Mac OSX, not sure about other setups, sorry... |
065a057
to
040e07e
Compare
The millisecond precision issue still exists. You can see exactly what I'm talking about here:
It seems that on Windows/Linux Node v0.12 / io.js platform issue? All tests pass on Node v0.10 on every platform. Any ideas? |
Perhaps a Node.js/io.js bug introduced in |
Ok, so it looks like
My sense is to say that let's keep the code simple, and go with option 1. Does anyone really care that much about millisecond precision? If it becomes an issue, we could always choose option 2 in the future. What are your thoughts? |
@goloroden what are your thoughts on the two options? |
Well, the point is that this feature is only useful if the timestamps are exactly the same. Our initial problem was that Hence, I'd vote for option 2: Otherwise it's not really preserving the timestamp, but only almost doing so (which in the end is the same as not preserving it at all). So, I'd vote for option 2 to really be correct (although I have to admit that it's not nice, but at least it's correct). |
@goloroden yeah, good point. @Narigo we could create two methods |
@jprichardson Thanks :-) And @Narigo: Thank you very much for taking the time to fix / implement this :-)! |
@jprichardson can you merge and implement that? :) I won't be able to do it today anymore and am gone for almost a week. Not sure where I can squeeze that in... :( |
@jprichardson are you working on it right now? I've seen your commits for the utimes util file. I'd have about 30 minutes to try and see how far I can get now (sleep's overrated) |
Signed-off-by: Joern Bernhardt <[email protected]>
Signed-off-by: Joern Bernhardt <[email protected]>
Signed-off-by: Joern Bernhardt <[email protected]>
Go for it. I'm probably done for the day on it :) Most of it should be working other than the |
040e07e
to
be5c6bb
Compare
Signed-off-by: Joern Bernhardt <[email protected]>
Looks like AppVeyor doesn't like me. Travis works now, though... no time to debug/fix the appveyor part anymore :( |
Add option to preserve timestamps
I've been unable to get this to work on Windows. I believe it to be a bug in Node.js/io.js. Submitted bug report: nodejs/node#2069 |
res.on('data', function(chunkBuffer) { |
Another attempt to fix #138.
Hope this is better for you than PR #139