[nautilus] properties: Don't show volume information for root when in flatpak



commit 63f562117afe82b8c830ad538e43a3040b62f7f5
Author: Corey Berla <corey berla me>
Date:   Mon May 9 12:47:51 2022 -0700

    properties: Don't show volume information for root when in flatpak
    
    Nautilus shows incorrect statistics for the root volume when
    running in a flatpak.  Don't show volume information when the
    /.flatpak-info file exists
    
    Related to: https://gitlab.gnome.org/GNOME/nautilus/-/issues/1997

 src/nautilus-properties-window.c | 11 +++++++++++
 1 file changed, 11 insertions(+)
---
diff --git a/src/nautilus-properties-window.c b/src/nautilus-properties-window.c
index 3bf9fc441..e6fcc8a24 100644
--- a/src/nautilus-properties-window.c
+++ b/src/nautilus-properties-window.c
@@ -35,6 +35,7 @@
 #define GNOME_DESKTOP_USE_UNSTABLE_API
 #include <libgnome-desktop/gnome-desktop-thumbnail.h>
 
+#include "nautilus-application.h"
 #include "nautilus-enums.h"
 #include "nautilus-error-reporting.h"
 #include "nautilus-file-operations.h"
@@ -2343,6 +2344,11 @@ should_show_volume_info (NautilusPropertiesWindow *self)
         return FALSE;
     }
 
+    if (is_root_directory (file) && nautilus_application_is_sandboxed ())
+    {
+        return FALSE;
+    }
+
     if (nautilus_file_can_unmount (file))
     {
         return TRUE;
@@ -2369,6 +2375,11 @@ should_show_volume_usage (NautilusPropertiesWindow *self)
         return FALSE;
     }
 
+    if (is_root_directory (file) && nautilus_application_is_sandboxed ())
+    {
+        return FALSE;
+    }
+
     if (nautilus_file_can_unmount (file))
     {
         return TRUE;


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