question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

preserveTimestamps does not work

See original GitHub issue

Using node v6.10.3 64bit Windows

The following does not preserve the last modified timestamp.

const fse = require('fs-extra');
fse.copySync("test", "copy/test", { preserveTimestamps: true });

**** Update 20180206 The above test case pertains to directories not files. Files are not affected.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:14

github_iconTop GitHub Comments

1reaction
RyanZimcommented, Dec 1, 2017

fs-extra is one of the top packages on npm, when we ship a regression, we usually hear about it pretty fast since it breaks so much of the ecosystem.

The reason I’m asking about what the timestamps are is that windows has a history of rounding errors. I want to see if the timestamps are at all close.

0reactions
bchr02commented, Feb 7, 2018

@manidlou the src and dest are directories. I just tested using fs-extra@5.0.0 and the issue still exists. I tested with files instead of directories and the issue would not replicate. Therefore, the issue is limited to directories.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Preserve Remote Timestamp not working - Forum - WinSCP
If the problem persists, turn off setting permissions or preserving timestamp. Alternatively you can turn on 'Ignore permission errors' option.
Read more >
How to Preserve Timestamps - FileZilla Pro
Choose Transfer > Preserve timestamps of transferred files · A warning is shown. For FTP, FTPS and SFTP protocols the timestamp for uploads ......
Read more >
Sync tasks are not preserving file timestamps
During a synchronization task run, the time stamp is being changed. Ideally the file should keep the original timestamp.
Read more >
"Preserve timestamps of transferred files" option not working ...
I am using latest version of FileZilla client on a Windows machine. The "Preserve timestamps of transferred files Ctrl+U" option works most of ......
Read more >
Pack or extract of package does not preserve timestamps on ...
Seems part of the problem is how the Zip entries are created in PackageBuilder.cs one possible fix is to set the LastWriteTime using...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found