| 925 | /* Don't need special execute permission on windows */ |
| 926 | cc_result Updater_MarkExecutable(void) { return 0; } |
| 927 | cc_result Updater_SetNewBuildTime(cc_uint64 timestamp) { |
| 928 | static const cc_string path = String_FromConst(UPDATE_FILE); |
| 929 | cc_filepath str; |
| 930 | cc_file file; |
| 931 | FILETIME ft; |
| 932 | cc_uint64 raw; |
| 933 | cc_result res; |
| 934 | |
| 935 | Platform_EncodePath(&str, &path); |
| 936 | res = File_OpenOrCreate(&file, &str); |
| 937 | if (res) return res; |
| 938 | |
| 939 | raw = 10000000 * (timestamp + FILETIME_UNIX_EPOCH); |
| 940 | ft.dwLowDateTime = (cc_uint32)raw; |
| 941 | ft.dwHighDateTime = (cc_uint32)(raw >> 32); |
| 942 | |
| 943 | if (!SetFileTime(file, NULL, NULL, &ft)) res = GetLastError(); |
| 944 | File_Close(file); |
| 945 | return res; |
| 946 | } |
| 947 | |
| 948 | |
| 949 | /*########################################################################################################################* |
nothing calls this directly
no test coverage detected