mirror of
https://gitlab.com/Theopse/fbi-i18n-zh.git
synced 2025-08-30 16:29:47 +08:00
Display error if target file item could not be created for bulk operations.
This commit is contained in:
parent
0d2fd5b28e
commit
554f96350e
@ -207,7 +207,14 @@ static void action_delete_internal(linked_list* items, list_item* selected, cons
|
||||
data->items = items;
|
||||
|
||||
file_info* targetInfo = (file_info*) selected->data;
|
||||
task_create_file_item(&data->targetItem, targetInfo->archive, targetInfo->path, targetInfo->attributes);
|
||||
Result targetCreateRes = task_create_file_item(&data->targetItem, targetInfo->archive, targetInfo->path, targetInfo->attributes);
|
||||
if(R_FAILED(targetCreateRes)) {
|
||||
error_display_res(NULL, NULL, targetCreateRes, "Failed to create target file item.");
|
||||
|
||||
action_delete_free_data(data);
|
||||
return;
|
||||
}
|
||||
|
||||
data->target = (file_info*) data->targetItem->data;
|
||||
|
||||
data->deleteInfo.data = data;
|
||||
|
@ -321,7 +321,14 @@ static void action_install_cias_internal(linked_list* items, list_item* selected
|
||||
data->items = items;
|
||||
|
||||
file_info* targetInfo = (file_info*) selected->data;
|
||||
task_create_file_item(&data->targetItem, targetInfo->archive, targetInfo->path, targetInfo->attributes);
|
||||
Result targetCreateRes = task_create_file_item(&data->targetItem, targetInfo->archive, targetInfo->path, targetInfo->attributes);
|
||||
if(R_FAILED(targetCreateRes)) {
|
||||
error_display_res(NULL, NULL, targetCreateRes, "Failed to create target file item.");
|
||||
|
||||
action_install_cias_free_data(data);
|
||||
return;
|
||||
}
|
||||
|
||||
data->target = (file_info*) data->targetItem->data;
|
||||
|
||||
data->delete = delete;
|
||||
|
@ -287,7 +287,14 @@ static void action_install_tickets_internal(linked_list* items, list_item* selec
|
||||
data->items = items;
|
||||
|
||||
file_info* targetInfo = (file_info*) selected->data;
|
||||
task_create_file_item(&data->targetItem, targetInfo->archive, targetInfo->path, targetInfo->attributes);
|
||||
Result targetCreateRes = task_create_file_item(&data->targetItem, targetInfo->archive, targetInfo->path, targetInfo->attributes);
|
||||
if(R_FAILED(targetCreateRes)) {
|
||||
error_display_res(NULL, NULL, targetCreateRes, "Failed to create target file item.");
|
||||
|
||||
action_install_tickets_free_data(data);
|
||||
return;
|
||||
}
|
||||
|
||||
data->target = (file_info*) data->targetItem->data;
|
||||
|
||||
data->delete = delete;
|
||||
|
@ -357,7 +357,14 @@ void action_paste_contents(linked_list* items, list_item* selected) {
|
||||
data->items = items;
|
||||
|
||||
file_info* targetInfo = (file_info*) selected->data;
|
||||
task_create_file_item(&data->targetItem, targetInfo->archive, targetInfo->path, targetInfo->attributes);
|
||||
Result targetCreateRes = task_create_file_item(&data->targetItem, targetInfo->archive, targetInfo->path, targetInfo->attributes);
|
||||
if(R_FAILED(targetCreateRes)) {
|
||||
error_display_res(NULL, NULL, targetCreateRes, "Failed to create target file item.");
|
||||
|
||||
action_paste_contents_free_data(data);
|
||||
return;
|
||||
}
|
||||
|
||||
data->target = (file_info*) data->targetItem->data;
|
||||
|
||||
data->pasteInfo.data = data;
|
||||
|
Loading…
x
Reference in New Issue
Block a user