GNOME Bugzilla – Bug 579276
An error is displayed when renaming directory or file on WebDAV location
Last modified: 2011-05-12 12:30:29 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:
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.
I have the same problem. Using ubuntu jaunty.
See this bug filed in Ubuntu Launchpad for more details and steps to reproduce: https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/512496
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
*** Bug 603383 has been marked as a duplicate of this bug. ***
Still a problem in Ubuntu Lucid 10.04, Nautilus 2.30.0.
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...)
-> gvfs Reassigning to GVfs/WebDAV. Christian, could you have a look at the patch attached here?
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.
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
Cherry-picked to gnome-3-0 as well.