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 594928 - content type not reported correctly
content type not reported correctly
Status: RESOLVED FIXED
Product: gvfs
Classification: Core
Component: gphoto backend
git master
Other Linux
: Normal normal
: ---
Assigned To: gvfs-maint
gvfs-maint
Depends on:
Blocks:
 
 
Reported: 2009-09-11 19:10 UTC by Michael Chudobiak
Modified: 2009-10-01 16:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
also set the fast content type (635 bytes, patch)
2009-09-11 19:10 UTC, Michael Chudobiak
none Details | Review
corrected patch (636 bytes, patch)
2009-09-11 19:12 UTC, Michael Chudobiak
committed Details | Review

Description Michael Chudobiak 2009-09-11 19:10:00 UTC
Created attachment 143015 [details] [review]
also set the fast content type

This started with bug 594632. Somehow, the gphoto backend reports a null
content type for the files on a camera. I haven't figured out why. We worked
around this by adding a call to g_content_type_guess, but that shouldn't be
needed
(http://git.gnome.org/cgit/gthumb/commit/?h=ext&id=b7e343131581aea8bbc39291f85b887a1de53796).

Things got really weird when debugging this with gvfs-info. Look at this:


[mjc@xena ~]$ gvfs-info gphoto2://[usb:001,005]/DCIM/100_FUJI/
display name: 100_FUJI
name: 100_FUJI
type: directory
size: 0
attributes:
  standard::name: 100_FUJI
[..snip..]


[mjc@xena ~]$ gvfs-info gphoto2://[usb:001,005]/DCIM/100_FUJI/DSCF0993.JPG
Error getting info: No such file or directory


[mjc@xena ~]$ cd .gvfs/gphoto2\ mount\ on\ usb%3A001\,005/DCIM/100_FUJI/


[mjc@xena 100_FUJI]$ gvfs-info
gphoto2://[usb:001,005]/DCIM/100_FUJI/DSCF0993.JPG
display name: DSCF0993.JPG
[..snip..]
attributes:
  standard::name: DSCF0993.JPG
[..snip..]
  standard::content-type: image/jpeg
[..snip..]
  preview::icon: GVfsIcon:0x1894c40


Summary: gvfs-info reports that the folder "100_FUJI" exists, but denies that
the photo inside exists until I "cd" to that folder. Why would it do that?


Lastly, the gphoto backend should also set the fast content type, like most
other backends. Patch attached.


- Mike
Comment 1 Michael Chudobiak 2009-09-11 19:12:03 UTC
Created attachment 143016 [details] [review]
corrected patch
Comment 2 Christian Kellner 2009-10-01 16:45:29 UTC
Comment on attachment 143016 [details] [review]
corrected patch

Committed as 3df2325 on master.
Comment 3 Christian Kellner 2009-10-01 16:46:18 UTC
Closing.