[file-roller: 116/123] FrCommand: fixed error handling when extracting files
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [file-roller: 116/123] FrCommand: fixed error handling when extracting files
- Date: Mon, 6 Aug 2012 13:50:36 +0000 (UTC)
commit 0cf0ccd817b1c1ae5084d80217aee22cc01198ca
Author: Paolo Bacchilega <paobac src gnome org>
Date: Mon Aug 6 13:04:32 2012 +0200
FrCommand: fixed error handling when extracting files
src/fr-command.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/src/fr-command.c b/src/fr-command.c
index 0d02353..fa3fe91 100644
--- a/src/fr-command.c
+++ b/src/fr-command.c
@@ -2336,11 +2336,12 @@ process_ready_for_extract_to_local_cb (GObject *source_object,
gpointer user_data)
{
XferData *xfer_data = user_data;
- FrError *error = NULL;
+ GError *error = NULL;
FrCommand *self = FR_COMMAND (xfer_data->archive);
- if (! fr_process_execute_finish (FR_PROCESS (source_object), result, &error))
- g_simple_async_result_set_from_error (xfer_data->result, error->gerror);
+ if (! fr_command_handle_process_error (FR_COMMAND (xfer_data->archive), result, &error))
+ /* command restarted */
+ return;
if (error == NULL) {
if (self->priv->remote_extraction) {
@@ -2354,9 +2355,10 @@ process_ready_for_extract_to_local_cb (GObject *source_object,
move_here (xfer_data->archive, xfer_data->cancellable);
}
else {
+ g_simple_async_result_set_from_error (xfer_data->result, error);
+
/* if an error occurred during extraction remove the
* temp extraction dir, if used. */
- g_print ("action_performed: ERROR!\n");
if ((self->priv->remote_extraction) && (self->priv->temp_extraction_dir != NULL)) {
_g_file_remove_directory (self->priv->temp_extraction_dir, NULL, NULL);
@@ -2370,7 +2372,7 @@ process_ready_for_extract_to_local_cb (GObject *source_object,
xfer_data->archive->extract_here = FALSE;
g_simple_async_result_complete_in_idle (xfer_data->result);
- fr_error_free (error);
+ _g_error_free (error);
xfer_data_free (xfer_data);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]