GNOME Bugzilla – Bug 583952
Nautilius/gvfs uses GET request for directory URL , instead of on directory contents
Last modified: 2009-12-11 13:09:15 UTC
Please describe the problem: When getting a folder from a remote server using Nautilus under Ubuntu 9.04 and 8.10, gvfs 1.0.2 generates a GET request for the folder URL rather than for each file within the folder. This causes the WebDAV server to serve an HTML index page for the folder, and the result is a file that contains HTML rather than the expected folder full of files. Steps to reproduce: 1. Connect to remote WebDAV server using Nautilus 2. Drag & drop a remote folder to the local filesystem Actual results: Creates an HTML index page file of the directory. Expected results: It should create a local directory with copies of all files, and subdirectories, of the remote directory. Does this happen every time? yes Other information:
I can confirm this bug in nautilus-2.26.3 + gvfs-1.2.3. WebDAV folders have the uncommon property of both being readable as a regular file and being containers, which makes it difficult to find the correct place for a fix. A possible solution is to check whether a file is a directory in gvfs when it's opened for reading and return an error. This, however, would add an artificial restriction to WebDAV filesystems. Another approach is to check whether a file is a directory in nautilus in copy_move_file and call copy_move_directory instead. I made a dirty patch to test this and it worked for me. I don't expect it to be seriously considered, though, because it lacks error checking. Maybe there's a better way of handling this from inside gvfs; in that case please disregard me.
Created attachment 135731 [details] [review] Dirty fix for nautilus
*** Bug 585356 has been marked as a duplicate of this bug. ***
The same problem is when making new directory (WebDAV MKDIR), see bug #585356.
I can confirm this bug as well for Nautilus-2.26.2 and Gvfs-1.2.2 (Ubuntu 9.04 x86-64). I am however able to create a directory via nautilus on the secure WebDAV share, but copying a directory to my local file system or to another location on the share both results in a html file instead of a copy of the directory.
This is a dupe of Bug #551339.
Yep, right again Mr. Gauthier. And I should really fix 551339. *** This bug has been marked as a duplicate of bug 551339 ***