custom-expo-updates-server icon indicating copy to clipboard operation
custom-expo-updates-server copied to clipboard

fs.stat().birthtime is unreliable

Open j005u opened this issue 2 years ago • 2 comments

Hi there,

On my WSL2 development setup, for whatever reason fs.stat().birthtimeMs returns 0 and therefore .birthtime is incorrect (but truthy).

I found that using .ctime instead works fine. I also considered doing new Date(parseInt(path.basename(updateBundlePath), 10) 1000).toISOString() instead as this would more closely match how the latest update gets picked, however not everyone may use the exact timestamp format (s vs ms) for the folder name, so that might blow up.

Happy to send a PR if appropriate.

j005u avatar Feb 09 '23 14:02 j005u