[gnome-software/gnome-40: 1/2] flatpak: Improve error reporting when low on disk space




commit 8b843b40b9f868a5e5f6792b287705deb2973f97
Author: Milan Crha <mcrha redhat com>
Date:   Tue May 4 19:37:06 2021 +0200

    flatpak: Improve error reporting when low on disk space
    
    Use a GsPlugin error for the disk space issue when the flatpak reports
    out of disk space, thus the GUI provides unified error and options for
    this kind of issue.
    
    Closes https://gitlab.gnome.org/GNOME/gnome-software/-/issues/217

 plugins/flatpak/gs-flatpak-utils.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/plugins/flatpak/gs-flatpak-utils.c b/plugins/flatpak/gs-flatpak-utils.c
index 26d56f7a3..af2af9141 100644
--- a/plugins/flatpak/gs-flatpak-utils.c
+++ b/plugins/flatpak/gs-flatpak-utils.c
@@ -43,6 +43,9 @@ gs_flatpak_error_convert (GError **perror)
                case FLATPAK_ERROR_RUNTIME_NOT_FOUND:
                        error->code = GS_PLUGIN_ERROR_NOT_SUPPORTED;
                        break;
+               case FLATPAK_ERROR_OUT_OF_SPACE:
+                       error->code = GS_PLUGIN_ERROR_NO_SPACE;
+                       break;
                default:
                        error->code = GS_PLUGIN_ERROR_FAILED;
                        break;


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