| 304 | } |
| 305 | |
| 306 | void 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 | |
| 329 | int refresh_thread(SceSize args, void *argp) |
| 330 | { |
nothing calls this directly
no test coverage detected