[Xfce4-commits] <thunar:master> Revert "Fix crash when opening a mountable drive with no media."

Jannis Pohlmann noreply at xfce.org
Fri Jul 15 21:04:01 CEST 2011


Updating branch refs/heads/master
         to f1b600b21d30b467a76d3306906d144cf491bd82 (commit)
       from 41e916c7f323a2723328dffce833d1e6bd76b901 (commit)

commit f1b600b21d30b467a76d3306906d144cf491bd82
Author: Jannis Pohlmann <jannis at xfce.org>
Date:   Fri Jul 15 21:03:12 2011 +0200

    Revert "Fix crash when opening a mountable drive with no media."
    
    This reverts commit 61c04e0407e2e9db1ab8f2d2a7fe9adc4edde716.
    
    Apparently, the commit breaks SMB browsing (see bug #7774 for more
    information). We will have to find another solution for the crash with
    mountable drivers that have no media.

 NEWS                 |    2 --
 thunar/thunar-file.c |   24 +++++++++++-------------
 2 files changed, 11 insertions(+), 15 deletions(-)

diff --git a/NEWS b/NEWS
index 91e6568..4daa41d 100644
--- a/NEWS
+++ b/NEWS
@@ -2,8 +2,6 @@
 =====
 - Fix crash when trying to thumbnail a file with unknown content type.
 - Fix properties dialog crash with files with unknown content type.
-- Fix crash when opening a mountable drive with no media (bug #7308).
-  Reported and solved by Ambroz Bizjak.
 - Fix crash when hovering a CD drive with a special icon (bug #7309).
   Reported and solved by Ambroz Bizjak.
 - Use portable abicheck.sh from xfconf.
diff --git a/thunar/thunar-file.c b/thunar/thunar-file.c
index fece42f..89eceea 100644
--- a/thunar/thunar-file.c
+++ b/thunar/thunar-file.c
@@ -702,15 +702,14 @@ thunar_file_load (ThunarFile   *file,
                   GCancellable *cancellable,
                   GError      **error)
 {
-  const gchar *target_uri;
-  GKeyFile    *key_file;
-  GError      *err = NULL;
-  GFile       *thumbnail_dir;
-  gchar       *base_name;
-  gchar       *md5_hash;
-  gchar       *p;
-  gchar       *thumbnail_dir_path;
-  gchar       *uri = NULL;
+  GKeyFile *key_file;
+  GError   *err = NULL;
+  GFile    *thumbnail_dir;
+  gchar    *base_name;
+  gchar    *md5_hash;
+  gchar    *p;
+  gchar    *thumbnail_dir_path;
+  gchar    *uri = NULL;
 
   _thunar_return_val_if_fail (THUNAR_IS_FILE (file), FALSE);
   _thunar_return_val_if_fail (error == NULL || *error == NULL, FALSE);
@@ -751,10 +750,9 @@ thunar_file_load (ThunarFile   *file,
     {
       if (g_file_info_get_file_type (file->info) == G_FILE_TYPE_MOUNTABLE)
         {
-          target_uri = 
-            g_file_info_get_attribute_string (file->info,
-                                              G_FILE_ATTRIBUTE_STANDARD_TARGET_URI);
-          file->is_mounted = (target_uri != NULL);
+          file->is_mounted = 
+            !g_file_info_get_attribute_boolean (file->info,
+                                                G_FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT);
         }
     }
   else



More information about the Xfce4-commits mailing list