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 745212 - query_info result contains attributes which doesn't fit attribute matcher
query_info result contains attributes which doesn't fit attribute matcher
Status: RESOLVED FIXED
Product: gvfs
Classification: Core
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: gvfs-maint
gvfs-maint
Depends on:
Blocks:
 
 
Reported: 2015-02-26 14:11 UTC by Ondrej Holy
Modified: 2016-02-09 09:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
apply attribute mask before sending infos (2.96 KB, patch)
2015-02-26 14:11 UTC, Ondrej Holy
committed Details | Review

Description Ondrej Holy 2015-02-26 14:11:18 UTC
Created attachment 297979 [details] [review]
apply attribute mask before sending infos

We are sending unwanted attributes from some backends, because g_file_info_copy_info is used, thus source attribute matcher is replaced. Apply attribute mask before sending as it is done in gvfsjobenumerate to fix this issue.

Maybe clearer solution would be fix those backends (archive, ftp, gphoto, and maybe others), but similar logic is used in enumerate. This will be working also when new limited backends will be added in future for example...
Comment 1 Ondrej Holy 2016-02-09 09:09:39 UTC
Comment on attachment 297979 [details] [review]
apply attribute mask before sending infos

Current output:
$ gvfs-info -a standard::icon ftp://HOST/
display name: / on HOST
edit name: /
name: /
type: directory
uri: ftp://HOST/
attributes:
  standard::type: 2
  standard::name: /
  standard::display-name: / on HOST
  standard::edit-name: /
  standard::icon: folder-remote
  standard::content-type: inode/directory
  standard::fast-content-type: inode/directory
  standard::symbolic-icon: folder-remote-symbolic

Output with the patch applied:
$ gvfs-info -a standard::icon ftp://HOST/
uri: ftp://HOST/
attributes:
  standard::icon: folder-remote
Comment 2 Ondrej Holy 2016-02-09 09:11:24 UTC
Comment on attachment 297979 [details] [review]
apply attribute mask before sending infos

I've pushed the patch already with slightly modified description:
commit cf8a6cc2d9b13dc8fe949fa8b9eb320f8f06985e