GNOME Bugzilla – Bug 755303
Resolved ftp symlink doesn't show info
Last modified: 2015-09-27 21:31:21 UTC
When there exists a symlink to an absolute path, the ftp backend does not resolve it properly and it doesn't return a GFileInfo filled with the correct information. For example, the following is missing owner, mode, time-modified, etc. $ gvfs-info ftp://ross@192.168.1.48/home/ross/symlink display name: symlink edit name: symlink name: symlink type: directory uri: ftp://ross@192.168.1.48/home/ross/symlink attributes: standard::type: 2 standard::is-hidden: FALSE standard::is-symlink: TRUE standard::name: VirtualBox VMs standard::display-name: symlink standard::edit-name: symlink standard::icon: folder standard::content-type: inode/directory standard::fast-content-type: inode/directory standard::symlink-target: /some/target/ standard::symbolic-icon: folder-symbolic id::filesystem: ftp:host=192.168.1.48,user=ross
Created attachment 311700 [details] [review] ftp: Sanitize absolute symlink paths when resolving The existing code sanitizes relative symlinks but not absolute symlinks when resolving them. But this can cause issues when looking up the resolved path (e.g. if it has a trailing slash, the correct information will not be returned because it will not get the parent directory correctly). To fix this, sanitze both absolute and relative paths.
Review of attachment 311700 [details] [review]: Looks good, thanks! Apart from the typo in the commit message s/sanitze/sanitize/...
Pushed to master as eefdc161bc016d9f5f8a5122e7c9eb75769078ed. Thanks for the review.