Added 'Extracting' text and file list refresh when keeping FTP in background.

This commit is contained in:
TheFloW 2016-09-06 18:16:29 +02:00
parent bd739abab4
commit 6c26fd6f08
2 changed files with 31 additions and 3 deletions

21
main.c
View File

@ -708,9 +708,27 @@ void contextMenuCtrl() {
}
case MENU_ENTRY_PASTE:
initMessageDialog(MESSAGE_DIALOG_PROGRESS_BAR, language_container[copy_mode == COPY_MODE_MOVE ? MOVING : COPYING]);
{
int copy_text = 0;
switch (copy_mode) {
case COPY_MODE_NORMAL:
copy_text = COPYING;
break;
case COPY_MODE_MOVE:
copy_text = MOVING;
break;
case COPY_MODE_EXTRACT:
copy_text = EXTRACTING;
break;
}
initMessageDialog(MESSAGE_DIALOG_PROGRESS_BAR, language_container[copy_text]);
dialog_step = DIALOG_STEP_PASTE;
break;
}
case MENU_ENTRY_DELETE:
{
@ -852,6 +870,7 @@ int dialogSteps() {
case DIALOG_STEP_FTP:
if (msg_result == MESSAGE_DIALOG_RESULT_YES) {
refresh = 1;
dialog_step = DIALOG_STEP_NONE;
} else if (msg_result == MESSAGE_DIALOG_RESULT_NO) {
powerUnlock();

View File

@ -214,7 +214,9 @@ int installPackage(char *file) {
}
int install_thread(SceSize args_size, InstallArguments *args) {
int res;
SceUID thid = -1;
char path[MAX_PATH_LENGTH];
// Lock power timers
powerLock();
@ -228,15 +230,22 @@ int install_thread(SceSize args_size, InstallArguments *args) {
sceIoMkdir(PACKAGE_PARENT, 0777);
// Open archive
int res = archiveOpen(args->file);
res = archiveOpen(args->file);
if (res < 0) {
closeWaitDialog();
errorDialog(res);
goto EXIT;
}
// Check for param.sfo
snprintf(path, MAX_PATH_LENGTH, "%s/sce_sys/param.sfo", args->file);
if (archiveFileGetstat(path, NULL) < 0) {
closeWaitDialog();
errorDialog(-2);
goto EXIT;
}
// Check permissions
char path[MAX_PATH_LENGTH];
snprintf(path, MAX_PATH_LENGTH, "%s/eboot.bin", args->file);
SceUID fd = archiveFileOpen(path, SCE_O_RDONLY, 0);
if (fd >= 0) {