-
-
Notifications
You must be signed in to change notification settings - Fork 21.9k
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
[Windows] Use GetFileTime
for FileAccess
#74830
Conversation
75dd92b
to
3b592e0
Compare
For easy testing, use PowerShell and |
30c84f2
to
bd34eed
Compare
bd34eed
to
70d04d9
Compare
70d04d9
to
580d08b
Compare
580d08b
to
271aac3
Compare
271aac3
to
0dd4134
Compare
0dd4134
to
34b448b
Compare
34b448b
to
7ea5c13
Compare
7ea5c13
to
ce4f75b
Compare
Need to investigate an issue that has arisen with this, unsure what exactly but it no longer works on my setup, will try fix it when I find the time to dig through the Windows stuff Edit: Works now, had to add a flag to be able to process directories, which broke detection, now it works correctly |
ce4f75b
to
0eadcc9
Compare
0eadcc9
to
e3f8970
Compare
e3f8970
to
2569093
Compare
I marked this as fix for #92911, but after testing again now, the results are wrong. Did something change? |
I will take a look, nothing should have changed though In what way are the results wrong? |
Expected results is that I get the same modified time in a dev build and an official build. This is no longer true. |
This code hasn't changed so I suspect something with the official builds have changed, or windows libraries |
2569093
to
a1ab458
Compare
a1ab458
to
41f5839
Compare
CC @bruvzg |
Prevents DST from rearranging file times.
41f5839
to
7139f46
Compare
GetFileTime
for FileAccess
Thanks! |
Thank you! |
LOL. You won't believe how insane this manifested itself when targeting VR; ie, iterating Win-based exports / remote debugs of Android APKs for standalone headsets. I thought I was going full-on LAWNMOWER MAN mad inside the VR there. (With changed resources apparently 'randomly' being updated or included in the next run... all based on what the Godot Editor under Windows thought had changed on file, obviously, in hindsight) Thanks for the quick fix! Looks like you managed to get it rectified and merged in less time than it took me to even pinpoint and reproduce for a Bug Report. Bravo!!! [applause] |
Cherry-picked for 4.3.1. |
Prevents DST from rearranging file times.
_wstat
does weird things with DST, which from I can find does not apply to UnixInternally the same function is used but
_wstat
converts it to local time, without indicating DST, the approach here is based on that in Windows CRT, using creation time as fallback, and here ensuring the epoch is valid.For all except DST overlap times this gives the same result, in UTC
Edit: Also resolves an inconsistency between MinGW and MSVC builds, see #92911
Fixes #74816
Fixes #92911
Fixes #96810
Fixes #96828
Fixes #96812