add explicit sleep in between batch delete calls in order to not pin core3.

otherwise, core3 is pinned and button inputs (including the power button) become unresponsive.
This commit is contained in:
ITotalJustice
2025-06-03 02:36:53 +01:00
parent e88ca8ede1
commit cd0817bd11
2 changed files with 4 additions and 0 deletions

View File

@@ -396,6 +396,7 @@ auto UninstallApp(ProgressBox* pbox, const Entry& entry) -> Result {
log_write("failed to delete file: %s\n", safe_buf.s);
} else {
log_write("deleted file: %s\n", safe_buf.s);
svcSleepThread(1e+5);
// todo: delete empty directories!
// fs::delete_directory(safe_buf);
}
@@ -603,6 +604,7 @@ auto InstallApp(ProgressBox* pbox, const Entry& entry) -> Result {
log_write("failed to delete: %s\n", safe_buf.s);
} else {
log_write("deleted file: %s\n", safe_buf.s);
svcSleepThread(1e+5);
}
}
}

View File

@@ -1425,9 +1425,11 @@ static Result DeleteAllCollections(ProgressBox* pbox, fs::Fs* fs, const Selected
if ((mode & FsDirOpenMode_ReadDirs) && p.type == FsDirEntryType_Dir) {
log_write("deleting dir: %s\n", full_path.s);
R_TRY(fs->DeleteDirectory(full_path));
svcSleepThread(1e+5);
} else if ((mode & FsDirOpenMode_ReadFiles) && p.type == FsDirEntryType_File) {
log_write("deleting file: %s\n", full_path.s);
R_TRY(fs->DeleteFile(full_path));
svcSleepThread(1e+5);
}
}