MCPcopy Create free account
hub / github.com/TheOfficialFloW/VitaShell / patch_callback

Function patch_callback

refresh.c:306–327  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

304}
305
306void patch_callback(void* data, const char* dir, const char* subdir)
307{
308 refresh_data_t *refresh_data = (refresh_data_t*)data;
309 char path[MAX_PATH_LENGTH];
310
311 if (refresh_data->refresh_pass) {
312 snprintf(path, MAX_PATH_LENGTH, "%s/%s", dir, subdir);
313 if (refreshNeeded(path, "patch")) {
314 // Move the directory to temp for installation
315 removePath(PATCH_TEMP, NULL);
316 sceIoRename(path, PATCH_TEMP);
317 if (refreshApp(PATCH_TEMP) == 1)
318 refresh_data->refreshed++;
319 else
320 // Restore folder on error
321 sceIoRename(PATCH_TEMP, path);
322 }
323 SetProgress(++refresh_data->processed, refresh_data->count);
324 } else {
325 refresh_data->count++;
326 }
327}
328
329int refresh_thread(SceSize args, void *argp)
330{

Callers

nothing calls this directly

Calls 4

refreshNeededFunction · 0.85
removePathFunction · 0.85
refreshAppFunction · 0.85
SetProgressFunction · 0.85

Tested by

no test coverage detected