[file-roller] command: handle password errors when adding files as well
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [file-roller] command: handle password errors when adding files as well
- Date: Tue, 27 Nov 2012 09:26:25 +0000 (UTC)
commit d94804700e51c7d4eda5a590d74aa784f2550235
Author: Paolo Bacchilega <paobac src gnome org>
Date: Mon Nov 26 23:34:01 2012 +0100
command: handle password errors when adding files as well
src/fr-command.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/src/fr-command.c b/src/fr-command.c
index 992c57e..480cf9e 100644
--- a/src/fr-command.c
+++ b/src/fr-command.c
@@ -1153,10 +1153,14 @@ process_ready_after_changing_archive (GObject *source_object,
gpointer user_data)
{
XferData *xfer_data = user_data;
- FrError *error = NULL;
+ GError *error = NULL;
- 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) {
+ g_simple_async_result_set_from_error (xfer_data->result, error);
}
else {
FrArchive *archive = xfer_data->archive;
@@ -1183,7 +1187,7 @@ process_ready_after_changing_archive (GObject *source_object,
g_simple_async_result_complete_in_idle (xfer_data->result);
- fr_error_free (error);
+ g_clear_error (&error);
xfer_data_free (xfer_data);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]