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 579276 - An error is displayed when renaming directory or file on WebDAV location
An error is displayed when renaming directory or file on WebDAV location
Status: RESOLVED FIXED
Product: gvfs
Classification: Core
Component: webdav backend
unspecified
Other All
: Normal major
: ---
Assigned To: gvfs-maint
gvfs-maint
: 603383 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-04-17 11:03 UTC by Ales Novy
Modified: 2011-05-12 12:30 UTC
See Also:
GNOME target: ---
GNOME version: 2.23/2.24


Attachments
possible fix (571 bytes, patch)
2010-07-23 00:40 UTC, simon.schuler
none Details | Review

Description Ales Novy 2009-04-17 11:03:10 UTC
Please describe the problem:
I have mounted WebDAV location like dav://aloen:8080/location and try to rename folder "aa" to "qq". It displays an error box with the following text:

"The item could not be renamed. Sorry, could not rename "aa" to "qq": The specified location is not mounted".

There is no error on the server and after refresh I can see that the operation was successful.
Using command line "gvfs-rename dav://aloen:8080/location/aa qq" works fine - it displays "Rename successful. ..."

Steps to reproduce:
1. 
2. 
3. 


Actual results:


Expected results:


Does this happen every time?
yes

Other information:
Comment 1 Ales Novy 2009-04-17 15:09:56 UTC
gvfs-rename ends with "Rename successful. New uri: dav://aloen:8080/qq". Maybe it's the problem for Nautilus because the URI reported by gvfs-rename is incorrect.
Comment 2 Jörn Dreyer 2009-06-12 18:41:17 UTC
I have the same problem. Using ubuntu jaunty.
Comment 3 brunogirin 2010-02-02 19:30:05 UTC
See this bug filed in Ubuntu Launchpad for more details and steps to reproduce: https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/512496
Comment 4 Joel Oliver 2010-02-13 05:12:10 UTC
Still affects Ubuntu Karmic 9.10 Nautilus 2.28.1

No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 9.10
Release:	9.10
Codename:	karmic
Comment 5 Michael Gauthier 2010-04-22 19:13:07 UTC
*** Bug 603383 has been marked as a duplicate of this bug. ***
Comment 6 Michael Gauthier 2010-04-22 19:14:29 UTC
Still a problem in Ubuntu Lucid 10.04, Nautilus 2.30.0.
Comment 7 simon.schuler 2010-07-23 00:40:06 UTC
Created attachment 166419 [details] [review]
possible fix

I made a small patch which fixes the problem for me. The problem is that the mount prefix gets lost on the answer to the move request. Not sure if my fix is correct, or if set_display_name_async_cb and g_daemon_file_set_display_name in gdaemonfile.c need fixing (I can't find a real documentation on this...)
Comment 8 Cosimo Cecchi 2010-08-01 10:58:09 UTC
-> gvfs

Reassigning to GVfs/WebDAV.

Christian, could you have a look at the patch attached here?
Comment 9 Stefan W 2011-01-24 23:12:11 UTC
This bug still exists in GNOME 2.32.0 on Ubuntu 10.10.

I ran across this independently using remote Ubuntu servers running Apache2 with HTTPS and Basic Auth.  I am able to reproduce the original bug on my Ubuntu 10.10 desktop with a very basic Apache WebDAV setup.

Steps to reproduce:
1. Install Apache; a2enmod dav_fs; edit apache config to add

    <Directory /var/www/files>
    Dav On
    </Directory>

2. mkdir /var/www/files; chown www-data /var/www/files; restart apache
3. In Nautilus select Go -> Location; enter dav://localhost/files
4. Right click -> Create Folder; type "foo"; press enter
5. Dismiss the error dialog; press f5
6. Right click on foo -> Rename; type "bar"; press enter
7. Dismiss the error dialog; press f5
8. Open a terminal and type "gvfs-rename dav://localhost/files/bar baz"
9. Refresh that folder again in Nautilus.
10. Back in the terminal type "gvfs-ls dav://localhost/baz"

Actual results:
* At step 4 a dialog is displayed saying

    This item could not be renamed.
    Sorry, could not rename "untitled folder"
    to "foo": The specified location is not
    mounted
                               [OK]

* At step 6, the same again with "foo" and "bar".

* At step 8 I see "Rename successful. New uri: dav://localhost/baz" (not the URI is wrong)

* At step 10 I see "Error: The specified location is not mounted" (just like in Nautilus, and because the URI is wrong of course)

Expected results:
* I did not expect to see those dialogs or have to reload the folder in steps 5 and 7.
* I would expect to see "Rename successful. New uri: dav://localhost/files/baz" and at step 9, if anything (is there a quiet option to gvfs-rename?)


Does this happen every time?
Yes.
Comment 10 Christian Kellner 2011-05-12 11:46:44 UTC
The problem here was that the path the backend supplied back to the client was
relative to the mount_prefix of the mount; so the client needs to resolve that
path and append the mount_prefix before creating a new GDaemonFile with the new
path.

Fixed on master with the following commit:
commit d4049d3ac0741c3700a029a24c869dfafd840dc2
Author: Christian Kellner <gicmo@gnome.org>
Date:   Thu May 12 10:53:04 2011 +0200

    daemonfile: Re-root the path in set_display_name ()

    The path we get as a result of a set_display_name operation has to be
    re-rooted with the mount_prefix of the specific mount.
    This fixes the "Location not mounted" error that we currently get for
    e.g. WebDAV mounts with a mount_prefix after renaming of files.

And the supportive commits:
commit 7a2942f7bdf39ebfc31ea90c0685b5890d30964d
commit 66bc0189d836130768df41900f3cf29723bbd870
Comment 11 Christian Kellner 2011-05-12 12:30:29 UTC
Cherry-picked to gnome-3-0 as well.