Closed zekth closed 3 years ago
This should be a bug for Deno.utime
Loss of precision when changing timestamps using Deno.utime
I tried it, deno.stat()
does not change the file's accessed
attribute.
So whenever you access, you get consistent properties.
// a.ts
const s = Deno.statSync('./test.ts');
console.log(s.created, s.accessed, s.modified);
> deno run --allow-all a.ts
1558369133 1558369638 1558369133
> deno run --allow-all a.ts
1558369133 1558369638 1558369133
> deno run --allow-all a.ts
1558369133 1558369638 1558369133
> deno run --allow-all a.ts
1558369133 1558369638 1558369133
I guess the problem does not appear in the copy module
, but in Deno.utime()
Sometimes it happens randomly on MacOs.
cc @axetroy