[gnome-software: 5/9] plugin: Ignore GS_DOWNLOAD_ERROR_NOT_MODIFIED




commit 5fe992ba30d57f48a80ddab557f1ac907f3162ac
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Mon Sep 12 14:09:36 2022 -0300

    plugin: Ignore GS_DOWNLOAD_ERROR_NOT_MODIFIED
    
    That means we have the most recent file already, which is an error
    that can safely be ignored.

 lib/gs-plugin.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/lib/gs-plugin.c b/lib/gs-plugin.c
index e4aa78b24..27dd6438b 100644
--- a/lib/gs-plugin.c
+++ b/lib/gs-plugin.c
@@ -1181,7 +1181,8 @@ gs_plugin_download_file (GsPlugin *plugin,
        while (result == NULL)
                g_main_context_iteration (context, TRUE);
 
-       if (!gs_download_file_finish (soup_session, result, &local_error)) {
+       if (!gs_download_file_finish (soup_session, result, &local_error) &&
+           !g_error_matches (local_error, GS_DOWNLOAD_ERROR, GS_DOWNLOAD_ERROR_NOT_MODIFIED)) {
                g_set_error_literal (error,
                                     GS_PLUGIN_ERROR,
                                     GS_PLUGIN_ERROR_DOWNLOAD_FAILED,


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