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 145086 - Useless mime-type mismatch warning
Useless mime-type mismatch warning
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: File and Folder Operations
0.x.x [obsolete]
Other Linux
: High normal
: ---
Assigned To: Bastien Nocera
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2004-06-28 10:41 UTC by Bastien Nocera
Modified: 2005-09-09 08:21 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
nautilus-dont-warn-type-mismatch.patch (1.20 KB, patch)
2004-06-28 10:43 UTC, Bastien Nocera
committed Details | Review

Description Bastien Nocera 2004-06-28 10:41:50 UTC
When a file has a mime-type mismatch between its suffix, and its actual
mime-type gathered from the data, nautilus shouldn't warn the user if the
handler for both mime-types are the same.
This happens very often with WMV videos:
- the container is ASF, thus the file gets an ASF mime-type from the data
- the suffix is wmv, which has another mime-type

Nautilus shouldn't warn the user if the handler is the same for both mime-types
(Totem in that case) because the application should/will guess the mime-type
from the data anyway.
Comment 1 Bastien Nocera 2004-06-28 10:43:23 UTC
Created attachment 29063 [details] [review]
nautilus-dont-warn-type-mismatch.patch

Patch for the above

(Do the GnomeVFSMimeApplications need to be freed in some way?)
Comment 2 Elijah Newren 2004-06-28 16:03:26 UTC
Patch -> mark as new and set priority to high.
Comment 3 Alexander Larsson 2004-07-02 09:11:29 UTC
I'm not sure about this... The way the actual app is selected from the file is
much more complicated than just gnome_vfs_mime_get_default_application(), there
might be some way to work around the warning using this.

Its probably good enought for now though. Although you need to handle
gnome_vfs_mime_get_default_application returning NULL in the strcmp.

Comment 4 Bastien Nocera 2004-07-02 11:37:23 UTC
2004-07-02  Bastien Nocera  <hadess@hadess.net>
                                                                                
        * src/file-manager/fm-directory-view.c:
        (activate_check_mime_types): Don't warn about mime-type mismatches
        if the handler is the same for both mime-types (Closes: #145086)

I'm leaving this opened, as we need to check what really happens when there is
no handler, or the handler is builtin.
Comment 5 Sven Neumann 2004-10-01 09:33:04 UTC
Has this been applied to the stable branch also? If not, could this please be
done? My gf keeps running into this bug after upgrading to GNOME 2.6. She works
a lot with EPS files which are recognized as Postscript document. But when
clicking the file in nautilus in order to view it, she gets that stupid warning
because the files have a .eps suffix.
Comment 6 Bastien Nocera 2004-10-01 09:49:08 UTC
Sven, that patch wasn't committed to the stable branch (at the time, meaning to
2.6), IIRC.
Comment 7 Martin Wehner 2005-02-04 21:34:42 UTC
Comment on attachment 29063 [details] [review]
nautilus-dont-warn-type-mismatch.patch

Marking patch as committed.
Comment 8 Christian Neumair 2005-09-09 08:21:36 UTC
We do this better in GNOME 2.12 (cf. bug 309862). Closing.