| 588 | *#########################################################################################################################*/ |
| 589 | struct FetchUpdateData FetchUpdateTask; |
| 590 | static void FetchUpdateTask_Handle(cc_uint8* data, cc_uint32 len) { |
| 591 | static const cc_string path = String_FromConst(UPDATE_FILE); |
| 592 | cc_result res; |
| 593 | |
| 594 | res = Stream_WriteAllTo(&path, data, len); |
| 595 | if (res) { Logger_SysWarn(res, "saving update"); return; } |
| 596 | |
| 597 | res = Updater_SetNewBuildTime(FetchUpdateTask.timestamp); |
| 598 | if (res) Logger_SysWarn(res, "setting update time"); |
| 599 | |
| 600 | res = Updater_MarkExecutable(); |
| 601 | if (res) Logger_SysWarn(res, "making update executable"); |
| 602 | |
| 603 | #ifdef CC_BUILD_WIN |
| 604 | Options_SetBool("update-dirty", true); |
| 605 | #endif |
| 606 | } |
| 607 | |
| 608 | void FetchUpdateTask_Run(cc_bool release, int buildIndex) { |
| 609 | cc_string url; char urlBuffer[URL_MAX_SIZE]; |
nothing calls this directly
no test coverage detected