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 755303 - Resolved ftp symlink doesn't show info
Resolved ftp symlink doesn't show info
Status: RESOLVED FIXED
Product: gvfs
Classification: Core
Component: ftp backend
1.25.x
Other Linux
: Normal normal
: ---
Assigned To: gvfs-maint
gvfs-maint
Depends on:
Blocks:
 
 
Reported: 2015-09-20 14:14 UTC by Ross Lagerwall
Modified: 2015-09-27 21:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
ftp: Sanitize absolute symlink paths when resolving (1.82 KB, patch)
2015-09-20 14:19 UTC, Ross Lagerwall
committed Details | Review

Description Ross Lagerwall 2015-09-20 14:14:16 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
Comment 1 Ross Lagerwall 2015-09-20 14:19:16 UTC
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.
Comment 2 Ondrej Holy 2015-09-23 11:18:47 UTC
Review of attachment 311700 [details] [review]:

Looks good, thanks!

Apart from the typo in the commit message s/sanitze/sanitize/...
Comment 3 Ross Lagerwall 2015-09-27 21:31:08 UTC
Pushed to master as eefdc161bc016d9f5f8a5122e7c9eb75769078ed. Thanks for the review.