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 105222 - libgnome-desktop should not check mime type
libgnome-desktop should not check mime type
Status: RESOLVED FIXED
Product: gnome-desktop
Classification: Core
Component: libgnome-desktop
2.2.x
Other other
: Normal normal
: ---
Assigned To: Desktop Maintainers
Desktop Maintainers
Depends on:
Blocks: 105047 105048
 
 
Reported: 2003-02-04 18:35 UTC by Andrew Sobala
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch (1.57 KB, patch)
2003-02-04 18:36 UTC, Andrew Sobala
none Details | Review

Description Andrew Sobala 2003-02-04 18:35:37 UTC
In function gnome_desktop_item_new_from_uri, it is checked that the URI is
of mime type application/x-gnome-app-info. This is bad because:

* It's a lousy way of checking a file's validity; it could still be
malformed. Basically it doesn't always work.

* It stops you from using the functions on custom file types, similar to
.desktop files but with a different mime type (this is my current problem).
There's no reason why the code shouldn't be shareable...

Please let me know what you think of the patch. An alternative way of doing
this is to have an alternative function that doesn't do the mime checking,
but that's pants.
Comment 1 Andrew Sobala 2003-02-04 18:36:26 UTC
Created attachment 14098 [details] [review]
Proposed patch
Comment 2 Andrew Sobala 2003-02-05 18:10:05 UTC
Maintainers: I'd really appreciate it if you could review this for the
gnome-2-2 branch ASAP.
Comment 3 Mark McLoughlin 2003-03-04 23:13:16 UTC
Looks fine to me. Please commit to HEAD. There is no gnome-2-2 branch yet.
Comment 4 Andrew Sobala 2003-03-06 23:27:07 UTC
Thanks Mark.

2003-03-06  Andrew Sobala  <aes@gnome.org>

* gnome-desktop-item.c: (gnome_desktop_item_new_from_uri): remove mime
type checking. Fixes bug #105222.