! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Thunar 1.2.2 unable to open gvfs-smb shares
Status:
RESOLVED: FIXED

Comments

Description Kevin Fenzi 2011-06-26 16:51:01 CEST
Downstream report: 
https://bugzilla.redhat.com/show_bug.cgi?id=712469

1.2.2 seems to not be able to use gvfs-smb. 1.2.1 works as expected.
Comment 1 Jannis Pohlmann editbugs 2011-07-15 20:58:43 CEST
Commit 61c04e0407e2e9db1ab8f2d2a7fe9adc4edde716 appears to be at fault. I'll think about a solution. It also affects the master branch by the way.
Comment 2 David A. Wheeler 2011-08-05 16:25:34 CEST
Good luck to you!  If it helps, I can confirm that Thunar 1.2.2 on Fedora 15 can't access SMB shares, and that on the same system Nautilus *can*.
Comment 3 Axel Sommerfeldt 2011-08-20 17:53:02 CEST
I can confirm that Commit 61c04e0407e2e9db1ab8f2d2a7fe9adc4edde716 is the fault. gvfs-smb shares always cause g_file_info_get_attribute_string(G_FILE_ATTRIBUTE_STANDARD_TARGET_URI) to return a non-null value (e.g. "smb://kanga.local/Public", regardless if they are mounted or not. Therefore file->is_mounted will always be set to TRUE for gvfs-smb shares.

So changing the lines

  target_uri =
    g_file_info_get_attribute_string (file->info,
                                      G_FILE_ATTRIBUTE_STANDARD_TARGET_URI);
  file->is_mounted = (target_uri != NULL);

to

  target_uri =
    g_file_info_get_attribute_string (file->info,
                                      G_FILE_ATTRIBUTE_STANDARD_TARGET_URI);
  file->is_mounted = (target_uri != NULL)
    ? !g_file_info_get_attribute_boolean (file->info,
                                          G_FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT)
    : FALSE;

seems to fix the problem without sabotaging the above Commit/Bugfix 61c04e0407e2e9db1ab8f2d2a7fe9adc4edde716.

At least it works fine on my PC (Fedora 15) now.
Comment 4 Axel Sommerfeldt 2011-08-22 08:13:15 CEST
Created attachment 3827 
The corresponding diff file for thunar/thunar-file.c
Comment 5 David A. Wheeler 2011-09-02 16:52:05 CEST
SUCCESS!

Kevin Fenzi has created a test package for Fedora 15 (see https://bugzilla.redhat.com/show_bug.cgi?id=712469), using Axel Sommerfeldt's proposed patch (see comment 3 here).

It works, beautifully.  The "bookmarks" now shows my SMB shares, which I can
select, enter passwords, and access.  The URL locations look right, they have
the usual format smb://[[domain;]username[:password]@]server[/share[/path]]

Can this repair go into the master development branch, *and* cause a minor update of the current Thunar release?  This is a big regression for a lot of people.  For example, it's really the only reason I needed to use Nautilus instead of Thunar.
Comment 6 Jannis Pohlmann editbugs 2011-09-14 20:22:16 CEST
Thanks. This is now fixed in master and in the xfce-4.8 branch:

commit 4406581a896e46b7589a905424b1d99ae762147e
Author: Jannis Pohlmann <jannis@xfce.org>
Date:   Wed Sep 14 20:09:18 2011 +0200

    Fix crash when opening a drive with no media (bugs #7308 and #7774).
    
    Patches provided by Ambroz Bizjak and Axel Sommerfeld.

Bug #7774

Reported by:
Kevin Fenzi
Reported on: 2011-06-26
Last modified on: 2011-09-14

People

Assignee:
Jannis Pohlmann
CC List:
2 users

Version

Attachments

The corresponding diff file for thunar/thunar-file.c (640 bytes, patch)
2011-08-22 08:13 CEST , Axel Sommerfeldt
axel.sommerfeldt : review+

Additional information