[Xfce4-commits] <thunar:xfce-4.8> Revert "Fix crash when opening a mountable drive with no media."
Jannis Pohlmann
noreply at xfce.org
Wed Sep 14 20:22:01 CEST 2011
Updating branch refs/heads/xfce-4.8
to 76738b76d7d7e77db8f37efc7dab877d11f251bd (commit)
from 432d7abc5b84b7a15bb37d35bb95869d98a824a8 (commit)
commit 76738b76d7d7e77db8f37efc7dab877d11f251bd
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 f30c31f..84240d8 100644
--- a/NEWS
+++ b/NEWS
@@ -8,8 +8,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.
- Treat backup files as hidden as with thunar-vfs (bug #7615).
diff --git a/thunar/thunar-file.c b/thunar/thunar-file.c
index d7f3e8e..7f4df23 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