After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 590730 - [PATCH] GDaemonMount calculates wrong root path when mount_prefix is set
[PATCH] GDaemonMount calculates wrong root path when mount_prefix is set
Status: RESOLVED FIXED
Product: gvfs
Classification: Core
Component: client module
1.2.x
Other All
: Normal normal
: ---
Assigned To: Tomas Bzatek
gvfs-maint
: 589221 590738 (view as bug list)
Depends on:
Blocks: 590862
 
 
Reported: 2009-08-04 12:44 UTC by Mads Chr. Olesen
Modified: 2009-08-18 14:01 UTC
See Also:
GNOME target: ---
GNOME version: 2.25/2.26


Attachments
Small patch that should resolve the issue (497 bytes, patch)
2009-08-04 12:45 UTC, Mads Chr. Olesen
committed Details | Review
gvfs-1.3.5-mountspec-prefix-ensure-ending-path-separator.patch (2.58 KB, patch)
2009-08-13 13:54 UTC, Tomas Bzatek
rejected Details | Review

Description Mads Chr. Olesen 2009-08-04 12:44:34 UTC
Please describe the problem:
When a mount is mounted with a mount_prefix != "/", GDaemonMount calculates the wrong root path, causing breakage of the .gvfs FUSE mount, and making the mounts unclickable in Nautilus.

Steps to reproduce:
1. Mount a WebDAV share, e.g. dav://webserver.com/dav/ where /dav is the webdav-enabled part (thus causing the mount's mount_prefix != "/")
2. Click on mount in Nautilus or browse to ~/.gvfs/


Actual results:
Nautilus displays an error that the mount point is not mounted, .gvfs displays I/O error when listing

Expected results:
No error, getting directory listing

Does this happen every time?
Yes

Other information:
Comment 1 Mads Chr. Olesen 2009-08-04 12:45:36 UTC
Created attachment 139862 [details] [review]
Small patch that should resolve the issue

Attached patch resolves the issue. mount_prefix is set to "/" by default, so this should not break anything.
Comment 2 Tomas Bzatek 2009-08-07 15:50:32 UTC
Basically it works, but I always get another mount after clicking the first one in the Nautilus sidebar. The key is to use deeper path when mounting, not the topmost dav-enabled one. That way the mount_prefix is set to "/dav/subdir/" instead of "/dav/". This might be another issue though, I've seen that before when mount_spec was set incorrectly (for dav+dns-sd URIs).


The other thing is fuse daemon, which works only for the topmost dav-enabled prefix, otherwise it would return series of errors:

$ ls -al
ls: cannot access WebDAV on webserver.com: Input/output error
total 5
dr-x------    3 tbzatek tbzatek    0 2009-08-07 17:37 .
drwxrwxrwx. 115 tbzatek tbzatek 5352 2009-08-07 17:47 ..
???????????   ? ?       ?          ?                ? WebDAV on webserver.com
Comment 3 Tomas Bzatek 2009-08-13 13:54:30 UTC
Created attachment 140660 [details] [review]
gvfs-1.3.5-mountspec-prefix-ensure-ending-path-separator.patch

Okay, I think I managed this whole thing to work. This patch fixes possible mount duplication which was caused by missing "/" at the end of the mount prefix, thus causing mountspec comparation to miss these active mounts.

So we need your original patch, this one and the one posted in bug 590862. Even the fuse daemon works correctly now, I can traverse through the directory structure without any inaccessible files. Active mounts can be clicked in Nautilus sidebar and you get correct root (dav backend always finds common root during mount operation). Mounting via nautilus-connect-server or gnome run dialog works fine as well. Client GIO applications can operate with prefixed mounts and can read and write files.
Comment 4 Mads Chr. Olesen 2009-08-13 14:24:39 UTC
I actually reported the dual mounting in bug 590738, and attached a patch to remove the trailing slash. But I think your approach with ensuring that there is a trailing patch is better - it saves redirects, and is more correct.
Comment 5 Mads Chr. Olesen 2009-08-13 14:26:59 UTC
Ehh... ensuring that there is a trailing _slash_
Comment 6 Mads Chr. Olesen 2009-08-13 14:27:28 UTC
*** Bug 590738 has been marked as a duplicate of this bug. ***
Comment 7 Tomas Bzatek 2009-08-13 14:48:09 UTC
(In reply to comment #4)
> I actually reported the dual mounting in bug 590738, and attached a patch to
> remove the trailing slash. But I think your approach with ensuring that there
> is a trailing patch is better - it saves redirects, and is more correct.
Oh, haven't noticed that one, have to better look next time.
Anyway, that's different approach and might work too. I felt this is more general issue and though no other backend uses prefixes yet, it's better to be ready.
Comment 8 Tomas Bzatek 2009-08-18 13:54:52 UTC
Committed slightly modified patches to master as 2b4d11a7e0eee6a6cd24234fdbdeae1672323cd3 and 226a763614fbe3093fcde175ea5d6d569b610eaf.
Comment 9 Tomas Bzatek 2009-08-18 14:01:42 UTC
*** Bug 589221 has been marked as a duplicate of this bug. ***