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 563956 - The xml comment files do not load anymore.
The xml comment files do not load anymore.
Status: RESOLVED FIXED
Product: gthumb
Classification: Other
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Paolo Bacchilega
Paolo Bacchilega
Depends on:
Blocks:
 
 
Reported: 2008-12-10 09:34 UTC by Jef Driesen
Modified: 2008-12-19 09:27 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Convert the uri to a regular filename, before testing whether the file exists. (607 bytes, patch)
2008-12-10 09:36 UTC, Jef Driesen
none Details | Review
fix comment reading/writing (1.28 KB, patch)
2008-12-17 21:26 UTC, Michael Chudobiak
committed Details | Review

Description Jef Driesen 2008-12-10 09:34:28 UTC
When viewing an image that has an associated xml comments file (and not "internal" metadata), no comments are displayed at all. This is due to passing an uri to the path_exists() function , which accepts only filenames.
Comment 1 Jef Driesen 2008-12-10 09:36:52 UTC
Created attachment 124332 [details] [review]
Convert the uri to a regular filename, before testing whether the file exists.
Comment 2 Michael Chudobiak 2008-12-17 20:19:40 UTC
Hmm... something is still very broken. Setting/editing comments on a tif file doesn't work, for example...

This needs further investigation.

- Mike
Comment 3 Michael Chudobiak 2008-12-17 21:26:32 UTC
Created attachment 124891 [details] [review]
fix comment reading/writing

Jef,

Can you test this patch?

There is still a problem changing comments in odd file types that we can read metadata from, but not write to, like an ORF raw file. I'm not sure there is an elegant fix for that. The existing code gived priority to the metadata rather than the xml - but if the metadata is read-only, the comments are not editable...

- Mike
Comment 4 Michael Chudobiak 2008-12-18 20:52:50 UTC
I've committed my patch, marking as fixed.

- Mike
Comment 5 Jef Driesen 2008-12-19 09:27:56 UTC
I never noticed the problem with the read-only embedded metadata, because I don't have such files. The patch seems to work fine. I won't be surprised there will be other similar bugs, due to this uri vs raw filename difference. I think all those problems will be solved when porting gthumb to gio/gvfs is finished (bug 525482).

Implementing a fallback to using the xml comment file, when writing the embedded metadata fails is not really an option. First of all, a user will expect the embedded metadata is updated, while only the xml comment file will actually be updated. And last but not least, when reading the metadata later again, the (not updated) embedded metadata would take priority and the change will appear lost. Maybe we could use file timestamps to pick which metadata (embedded vs xml) should take priority? Anyway, this is stuff for a new bug. Also related to bug 533819.