[file-roller] 7zip: clear the error to ignore it



commit a34f1a0505854ac57dc5cae81babcbb05c79ff17
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Mon Aug 15 08:27:01 2016 +0200

    7zip: clear the error to ignore it

 src/fr-command-7z.c |    3 ++-
 src/fr-command.c    |    2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/fr-command-7z.c b/src/fr-command-7z.c
index 1befbf5..877d8db 100644
--- a/src/fr-command-7z.c
+++ b/src/fr-command-7z.c
@@ -552,7 +552,8 @@ fr_command_7z_handle_error (FrCommand *command,
        }
 
        if (error->status <= 1) {
-               error->type = FR_ERROR_NONE;
+               /* ignore warnings */
+               fr_error_clear_gerror (error);
        }
        else {
                GList *scan;
diff --git a/src/fr-command.c b/src/fr-command.c
index 14da9e9..8eb947f 100644
--- a/src/fr-command.c
+++ b/src/fr-command.c
@@ -369,7 +369,7 @@ fr_command_handle_process_error (FrCommand     *self,
                 * 'restart' flag */
                FR_COMMAND_GET_CLASS (G_OBJECT (self))->handle_error (self, process_error);
 
-       if ((error != NULL) && (process_error->gerror != NULL))
+       if ((error != NULL) && (process_error->gerror != NULL) && (process_error->type != FR_ERROR_NONE))
                *error = g_error_copy (process_error->gerror);
        fr_error_free (process_error);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]