You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
os.touchfile is implemented (in public/core/src/host/os_touchfile.c) by inserting one empty space at the end of the file, and then truncating it to the original size. A comment there suggests this is done in order to have a simple multiplatform implementation. However, on Windows it does not work fully as intended - it's touched alright, but the file does not get truncated, resulting in a file containing a bogus change.
Perhaps this worked at some point and in the meantime something changed in the CRT, and I am not sure what is wrong exactly, but my bet would be on OS having multiple handles to the files (because of difference in CRT functions used) and not flushing the changes when fclose is called. Anyway, here's a patch that fixed it for me, perhaps will be of some use: https://gist.github.com/nsprljan/6c2902794b897a51a2534028cd4bbc6e
The text was updated successfully, but these errors were encountered:
os.touchfile is implemented (in public/core/src/host/os_touchfile.c) by inserting one empty space at the end of the file, and then truncating it to the original size. A comment there suggests this is done in order to have a simple multiplatform implementation. However, on Windows it does not work fully as intended - it's touched alright, but the file does not get truncated, resulting in a file containing a bogus change.
Perhaps this worked at some point and in the meantime something changed in the CRT, and I am not sure what is wrong exactly, but my bet would be on OS having multiple handles to the files (because of difference in CRT functions used) and not flushing the changes when fclose is called. Anyway, here's a patch that fixed it for me, perhaps will be of some use:
https://gist.github.com/nsprljan/6c2902794b897a51a2534028cd4bbc6e
The text was updated successfully, but these errors were encountered: