GNOME Bugzilla – Bug 721543
gvfs / nautilus can't open a folder with • in the name
Last modified: 2014-04-02 19:50:51 UTC
In nautilus I mounted a dav://-server on port 80. When I try to open a folder with the name "•WORKFLOW•" it gives a "Moved permanatly" error. I can not open that folder. On the local file-system everything goes oke. Additional info: * gvfs-1.18.3-1 , nautilus 3.10.1.1
-> gvfs Sounds like a bug in the gvfs webdav backend.
I've got free webdav account on: http://www.ajaxfilebrowser.com and renamed file and dir to have "•" in the name. I've successfully listed the directory containing the file by gvfs-ls and also by the Nautilus... Are you able to reproduce it using account from http://www.ajaxfilebrowser.com?
I tested it on my updated Fedora 20 with: gvfs-1.18.3-2.fc20 nautilus-3.10.1-3.fc20
Created attachment 272071 [details] [review] dav: Unescape URIs before comparing them for equality In some instances (e.g. Apache), gvfs uses percent encodings like %2A while Apache returns redirections encoded like %2a. This makes redirections fail when non-ascii characters are used in the path.
I reproduced against an Apache 2.4 Webdav server. The problem is that it returns a path like /dav/%e2%80%a2WORKFLOW%e2%80%a2/ while gvfs tries to match it against /dav/%E2%80%A2WORKFLOW%E2%80%A2 which fails because the case is different. So the easiest fix is to unescape the paths before comparing them.
Review of attachment 272071 [details] [review]: Looks good, thanks.
Review of attachment 272071 [details] [review]: ::: daemon/gvfsbackenddav.c @@ +239,3 @@ + ua = g_uri_unescape_string (a, "/"); + ub = g_uri_unescape_string (b, "/"); But you should probably check whether ua, ub isn't NULL...
Created attachment 272617 [details] [review] dav: Unescape URIs before comparing them for equality In some instances (e.g. Apache), gvfs uses percent encodings like %2A while Apache returns redirections encoded like %2a. This makes redirections fail when non-ascii characters are used in the path.
Review of attachment 272617 [details] [review]: Looks good, thanks.
Pushed to master as 50af53dad6c6d6df4ba03ac04a6c6c76d2ba2337. Thanks!