Closed Bug 373955 Opened 17 years ago Closed 17 years ago

[FIX]/etc/mailcap takes precedence on GNOME mime preferences

Categories

(Core Graveyard :: File Handling, defect, P2)

1.8 Branch
x86
Linux
defect

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.9alpha4

People

(Reporter: glandium, Assigned: bzbarsky)

Details

(Keywords: fixed1.8.1.4, Whiteboard: [need testcase])

Attachments

(1 file, 1 obsolete file)

As per comment #44 in bug #273524, I'm filing a new bug about /etc/mailcap taking precedence on GNOME mime preferences. Here is the output running the following command:
NSPR_LOG_MODULES=HelperAppService:5 ./firefox http://developer.gnome.org/doc/whitepapers/nautilus/nautilus-internals.pdf
(the firefox used here is plain 2.0.0.2 taken from ftp.mozilla.org)

-1222022944[8a55eb0]: Found extension 'pdf' (filename is 'nautilus-internals.pdf', handling attachment: 0)
-1222022944[8a55eb0]: HelperAppService::DoContent: mime 'application/pdf', extension 'pdf'
-1222022944[8a55eb0]: Getting mimeinfo from type 'application/pdf' ext 'pdf'
-1222022944[8a55eb0]: Here we do a mimetype lookup for 'application/pdf'
-1222022944[8a55eb0]: -- LookUpExtensionsAndDescription for type 'application/pdf'
-1222022944[8a55eb0]: -- GetFileLocation.  Pref: 'helpers.private_mime_types_file'  EnvVar: '(null)'
-1222022944[8a55eb0]: -- GetExtensionsAndDescriptionFromMimetypesFile
-1222022944[8a55eb0]: Getting extensions and description from types file '~/.mime.types'
-1222022944[8a55eb0]: Using type 'application/pdf'
-1222022944[8a55eb0]: -- CreateInputStream
-1222022944[8a55eb0]: Current entry: 'type=application/x-java-jnlp-file desc="Java Web Start" exts="jnlp"'
-1222022944[8a55eb0]: -- ParseNetscapeMIMETypesEntry
-1222022944[8a55eb0]: -- GetFileLocation.  Pref: 'helpers.global_mime_types_file'  EnvVar: '(null)'
-1222022944[8a55eb0]: -- GetExtensionsAndDescriptionFromMimetypesFile
-1222022944[8a55eb0]: Getting extensions and description from types file '/etc/mime.types'
-1222022944[8a55eb0]: Using type 'application/pdf'
-1222022944[8a55eb0]: -- CreateInputStream
-1222022944[8a55eb0]: Current entry: 'application/activemessage'
-1222022944[8a55eb0]: -- ParseNormalMIMETypesEntry
-1222022944[8a55eb0]: Current entry: 'application/andrew-inset                  ez'
-1222022944[8a55eb0]: -- ParseNormalMIMETypesEntry
-1222022944[8a55eb0]: Current entry: 'application/applefile'
-1222022944[8a55eb0]: -- ParseNormalMIMETypesEntry
-1222022944[8a55eb0]: Current entry: 'application/atom                          atom'
-1222022944[8a55eb0]: -- ParseNormalMIMETypesEntry
-1222022944[8a55eb0]: Current entry: 'application/atomcat+xml                           atomcat'
-1222022944[8a55eb0]: -- ParseNormalMIMETypesEntry
-1222022944[8a55eb0]: Current entry: 'application/atomserv+xml                  atomsrv'
-1222022944[8a55eb0]: -- ParseNormalMIMETypesEntry
-1222022944[8a55eb0]: Current entry: 'application/atomicmail'
-1222022944[8a55eb0]: -- ParseNormalMIMETypesEntry
-1222022944[8a55eb0]: Current entry: 'application/batch-SMTP'
-1222022944[8a55eb0]: -- ParseNormalMIMETypesEntry
-1222022944[8a55eb0]: Current entry: 'application/beep+xml'
-1222022944[8a55eb0]: -- ParseNormalMIMETypesEntry
-1222022944[8a55eb0]: Current entry: 'application/cals-1840'
-1222022944[8a55eb0]: -- ParseNormalMIMETypesEntry
-1222022944[8a55eb0]: Current entry: 'application/cap                                   cap pcap'
-1222022944[8a55eb0]: -- ParseNormalMIMETypesEntry
-1222022944[8a55eb0]: Current entry: 'application/commonground'
-1222022944[8a55eb0]: -- ParseNormalMIMETypesEntry
-1222022944[8a55eb0]: Current entry: 'application/cu-seeme                              cu'
-1222022944[8a55eb0]: -- ParseNormalMIMETypesEntry
-1222022944[8a55eb0]: Current entry: 'application/cybercash'
-1222022944[8a55eb0]: -- ParseNormalMIMETypesEntry
-1222022944[8a55eb0]: Current entry: 'application/dca-rft'
-1222022944[8a55eb0]: -- ParseNormalMIMETypesEntry
-1222022944[8a55eb0]: Current entry: 'application/dec-dx'
-1222022944[8a55eb0]: -- ParseNormalMIMETypesEntry
-1222022944[8a55eb0]: Current entry: 'application/docbook+xml'
-1222022944[8a55eb0]: -- ParseNormalMIMETypesEntry
-1222022944[8a55eb0]: Current entry: 'application/dsptype                               tsp'
-1222022944[8a55eb0]: -- ParseNormalMIMETypesEntry
-1222022944[8a55eb0]: Current entry: 'application/dvcs'
-1222022944[8a55eb0]: -- ParseNormalMIMETypesEntry
-1222022944[8a55eb0]: Current entry: 'application/edi-consent'
-1222022944[8a55eb0]: -- ParseNormalMIMETypesEntry
-1222022944[8a55eb0]: Current entry: 'application/edi-x12'
-1222022944[8a55eb0]: -- ParseNormalMIMETypesEntry
-1222022944[8a55eb0]: Current entry: 'application/edifact'
-1222022944[8a55eb0]: -- ParseNormalMIMETypesEntry
-1222022944[8a55eb0]: Current entry: 'application/eshop'
-1222022944[8a55eb0]: -- ParseNormalMIMETypesEntry
-1222022944[8a55eb0]: Current entry: 'application/font-tdpfr'
-1222022944[8a55eb0]: -- ParseNormalMIMETypesEntry
-1222022944[8a55eb0]: Current entry: 'application/futuresplash                  spl'
-1222022944[8a55eb0]: -- ParseNormalMIMETypesEntry
-1222022944[8a55eb0]: Current entry: 'application/ghostview'
-1222022944[8a55eb0]: -- ParseNormalMIMETypesEntry
-1222022944[8a55eb0]: Current entry: 'application/hta                                   hta'
-1222022944[8a55eb0]: -- ParseNormalMIMETypesEntry
-1222022944[8a55eb0]: Current entry: 'application/http'
-1222022944[8a55eb0]: -- ParseNormalMIMETypesEntry
-1222022944[8a55eb0]: Current entry: 'application/hyperstudio'
-1222022944[8a55eb0]: -- ParseNormalMIMETypesEntry
-1222022944[8a55eb0]: Current entry: 'application/iges'
-1222022944[8a55eb0]: -- ParseNormalMIMETypesEntry
-1222022944[8a55eb0]: Current entry: 'application/index'
-1222022944[8a55eb0]: -- ParseNormalMIMETypesEntry
-1222022944[8a55eb0]: Current entry: 'application/index.cmd'
-1222022944[8a55eb0]: -- ParseNormalMIMETypesEntry
-1222022944[8a55eb0]: Current entry: 'application/index.obj'
-1222022944[8a55eb0]: -- ParseNormalMIMETypesEntry
-1222022944[8a55eb0]: Current entry: 'application/index.response'
-1222022944[8a55eb0]: -- ParseNormalMIMETypesEntry
-1222022944[8a55eb0]: Current entry: 'application/index.vnd'
-1222022944[8a55eb0]: -- ParseNormalMIMETypesEntry
-1222022944[8a55eb0]: Current entry: 'application/iotp'
-1222022944[8a55eb0]: -- ParseNormalMIMETypesEntry
-1222022944[8a55eb0]: Current entry: 'application/ipp'
-1222022944[8a55eb0]: -- ParseNormalMIMETypesEntry
-1222022944[8a55eb0]: Current entry: 'application/isup'
-1222022944[8a55eb0]: -- ParseNormalMIMETypesEntry
-1222022944[8a55eb0]: Current entry: 'application/java-archive                  jar'
-1222022944[8a55eb0]: -- ParseNormalMIMETypesEntry
-1222022944[8a55eb0]: Current entry: 'application/java-serialized-object                ser'
-1222022944[8a55eb0]: -- ParseNormalMIMETypesEntry
-1222022944[8a55eb0]: Current entry: 'application/java-vm                               class'
-1222022944[8a55eb0]: -- ParseNormalMIMETypesEntry
-1222022944[8a55eb0]: Current entry: 'application/mac-binhex40                  hqx'
-1222022944[8a55eb0]: -- ParseNormalMIMETypesEntry
-1222022944[8a55eb0]: Current entry: 'application/mac-compactpro                        cpt'
-1222022944[8a55eb0]: -- ParseNormalMIMETypesEntry
-1222022944[8a55eb0]: Current entry: 'application/macwriteii'
-1222022944[8a55eb0]: -- ParseNormalMIMETypesEntry
-1222022944[8a55eb0]: Current entry: 'application/marc'
-1222022944[8a55eb0]: -- ParseNormalMIMETypesEntry
-1222022944[8a55eb0]: Current entry: 'application/mathematica                           nb'
-1222022944[8a55eb0]: -- ParseNormalMIMETypesEntry
-1222022944[8a55eb0]: Current entry: 'application/mathematica-old'
-1222022944[8a55eb0]: -- ParseNormalMIMETypesEntry
-1222022944[8a55eb0]: Current entry: 'application/ms-tnef'
-1222022944[8a55eb0]: -- ParseNormalMIMETypesEntry
-1222022944[8a55eb0]: Current entry: 'application/msaccess                              mdb'
-1222022944[8a55eb0]: -- ParseNormalMIMETypesEntry
-1222022944[8a55eb0]: Current entry: 'application/msword                                doc dot'
-1222022944[8a55eb0]: -- ParseNormalMIMETypesEntry
-1222022944[8a55eb0]: Current entry: 'application/news-message-id'
-1222022944[8a55eb0]: -- ParseNormalMIMETypesEntry
-1222022944[8a55eb0]: Current entry: 'application/news-transmission'
-1222022944[8a55eb0]: -- ParseNormalMIMETypesEntry
-1222022944[8a55eb0]: Current entry: 'application/ocsp-request'
-1222022944[8a55eb0]: -- ParseNormalMIMETypesEntry
-1222022944[8a55eb0]: Current entry: 'application/ocsp-response'
-1222022944[8a55eb0]: -- ParseNormalMIMETypesEntry
-1222022944[8a55eb0]: Current entry: 'application/octet-stream                  bin'
-1222022944[8a55eb0]: -- ParseNormalMIMETypesEntry
-1222022944[8a55eb0]: Current entry: 'application/oda                                   oda'
-1222022944[8a55eb0]: -- ParseNormalMIMETypesEntry
-1222022944[8a55eb0]: Current entry: 'application/ogg                                   ogg'
-1222022944[8a55eb0]: -- ParseNormalMIMETypesEntry
-1222022944[8a55eb0]: Current entry: 'application/parityfec'
-1222022944[8a55eb0]: -- ParseNormalMIMETypesEntry
-1222022944[8a55eb0]: Current entry: 'application/pdf                                   pdf'
-1222022944[8a55eb0]: -- ParseNormalMIMETypesEntry
-1222022944[8a55eb0]: -- LookUpHandlerAndDescription for type 'application/pdf'
-1222022944[8a55eb0]: -- GetFileLocation.  Pref: 'helpers.private_mailcap_file'  EnvVar: 'PERSONAL_MAILCAP'
-1222022944[8a55eb0]: -- GetHandlerAndDescriptionFromMailcapFile
-1222022944[8a55eb0]: Getting handler and description from mailcap file '~/.mailcap'
-1222022944[8a55eb0]: Using type 'application/pdf'
-1222022944[8a55eb0]: Current entry: 'application/vnd.sun.xml.writer;/home/mh/.openoffice/1.1.1/soffice %s'
-1222022944[8a55eb0]: Current entry: 'application/vnd.sun.xml.writer.global;/home/mh/.openoffice/1.1.1/soffice %s'
-1222022944[8a55eb0]: Current entry: 'application/vnd.stardivision.writer;/home/mh/.openoffice/1.1.1/soffice %s'
-1222022944[8a55eb0]: Current entry: 'application/vnd.stardivision.writer-global;/home/mh/.openoffice/1.1.1/soffice %s'
-1222022944[8a55eb0]: Current entry: 'application/x-starwriter;/home/mh/.openoffice/1.1.1/soffice %s'
-1222022944[8a55eb0]: Current entry: 'application/vnd.sun.xml.writer.template;/home/mh/.openoffice/1.1.1/soffice %s'
-1222022944[8a55eb0]: Current entry: 'application/msword;/home/mh/.openoffice/1.1.1/soffice %s'
-1222022944[8a55eb0]: Current entry: 'application/vnd.sun.xml.calc;/home/mh/.openoffice/1.1.1/soffice %s'
-1222022944[8a55eb0]: Current entry: 'application/vnd.stardivision.calc;/home/mh/.openoffice/1.1.1/soffice %s'
-1222022944[8a55eb0]: Current entry: 'application/x-starcalc;/home/mh/.openoffice/1.1.1/soffice %s'
-1222022944[8a55eb0]: Current entry: 'application/vnd.sun.xml.calc.template;/home/mh/.openoffice/1.1.1/soffice %s'
-1222022944[8a55eb0]: Current entry: 'application/excel;/home/mh/.openoffice/1.1.1/soffice %s'
-1222022944[8a55eb0]: Current entry: 'application/msexcel;/home/mh/.openoffice/1.1.1/soffice %s'
-1222022944[8a55eb0]: Current entry: 'application/vnd.ms-excel;/home/mh/.openoffice/1.1.1/soffice %s'
-1222022944[8a55eb0]: Current entry: 'application/x-msexcel;/home/mh/.openoffice/1.1.1/soffice %s'
-1222022944[8a55eb0]: Current entry: 'application/vnd.sun.xml.impress;/home/mh/.openoffice/1.1.1/soffice %s'
-1222022944[8a55eb0]: Current entry: 'application/vnd.stardivision.impress;/home/mh/.openoffice/1.1.1/soffice %s'
-1222022944[8a55eb0]: Current entry: 'application/vnd.stardivision.impress-packed;/home/mh/.openoffice/1.1.1/soffice %s'
-1222022944[8a55eb0]: Current entry: 'application/x-starimpress;/home/mh/.openoffice/1.1.1/soffice %s'
-1222022944[8a55eb0]: Current entry: 'application/vnd.sun.xml.impress.template;/home/mh/.openoffice/1.1.1/soffice %s'
-1222022944[8a55eb0]: Current entry: 'application/powerpoint;/home/mh/.openoffice/1.1.1/soffice %s'
-1222022944[8a55eb0]: Current entry: 'application/mspowerpoint;/home/mh/.openoffice/1.1.1/soffice %s'
-1222022944[8a55eb0]: Current entry: 'application/vnd.ms-powerpoint;/home/mh/.openoffice/1.1.1/soffice %s'
-1222022944[8a55eb0]: Current entry: 'application/x-mspowerpoint;/home/mh/.openoffice/1.1.1/soffice %s'
-1222022944[8a55eb0]: Current entry: 'application/vnd.sun.xml.draw;/home/mh/.openoffice/1.1.1/soffice %s'
-1222022944[8a55eb0]: Current entry: 'application/vnd.stardivision.draw;/home/mh/.openoffice/1.1.1/soffice %s'
-1222022944[8a55eb0]: Current entry: 'application/x-stardraw;/home/mh/.openoffice/1.1.1/soffice %s'
-1222022944[8a55eb0]: Current entry: 'application/vnd.sun.xml.draw.template;/home/mh/.openoffice/1.1.1/soffice %s'
-1222022944[8a55eb0]: Current entry: 'application/vnd.sun.xml.math;/home/mh/.openoffice/1.1.1/soffice %s'
-1222022944[8a55eb0]: Current entry: 'application/vnd.stardivision.math;/home/mh/.openoffice/1.1.1/soffice %s'
-1222022944[8a55eb0]: Current entry: 'application/x-starmath;/home/mh/.openoffice/1.1.1/soffice %s'
-1222022944[8a55eb0]: Current entry: 'text/html; lynx -dump -force_html -display_charset=utf-8 -assume_charset=%{charset} %s; needsterminal; copiousoutput;'
-1222022944[8a55eb0]: Current entry: 'text/html; iconv -f %{charset} %s | lynx -stdin -dump -force_html -display_charset=utf-8 -assume_local_charset=utf-8; needsterminal; copiousoutput;'
-1222022944[8a55eb0]: Current entry: 'application/x-java-jnlp-file; /tmp/make-jpkg.slkFi29950/extract/jre1.5.0_06/bin/javaws %s'
-1222022944[8a55eb0]: -- LookUpHandlerAndDescription for type 'application/pdf'
-1222022944[8a55eb0]: -- GetFileLocation.  Pref: 'helpers.global_mailcap_file'  EnvVar: 'MAILCAP'
-1222022944[8a55eb0]: -- GetHandlerAndDescriptionFromMailcapFile
-1222022944[8a55eb0]: Getting handler and description from mailcap file '/etc/mailcap'
-1222022944[8a55eb0]: Using type 'application/pdf'
-1222022944[8a55eb0]: Current entry: 'text/html; /usr/bin/galeon '%s'; description=HTML Text; test=test -n "$DISPLAY"; nametemplate=%s.html'
-1222022944[8a55eb0]: Current entry: 'text/xml; /usr/bin/galeon '%s'; description=XML Text; test=test -n "$DISPLAY"; nametemplate=%s.xml'
-1222022944[8a55eb0]: Current entry: 'text/plain; less '%s'; needsterminal'
-1222022944[8a55eb0]: Current entry: 'image/svg+xml; inkscape '%s'; description="Scalable Vector Graphics"; test=test -n "$DISPLAY"; print=inkscape --print='|lp' '%s'; edit=inkscape '%s'; compose=inkscape '%s''
-1222022944[8a55eb0]: Current entry: 'image/svg; inkscape '%s'; description="Scalable Vector Graphics"; test=test -n "$DISPLAY"; print=inkscape --print='|lp' '%s'; edit=inkscape '%s';  compose=inkscape '%s''
-1222022944[8a55eb0]: Current entry: 'image/svg+xml; false; description="Scalable Vector Graphics"; test=test -z "$DISPLAY"; print=inkscape --print='|lp' '%s''
-1222022944[8a55eb0]: Current entry: 'image/svg; false; description="Scalable Vector Graphics"; test=test -z "$DISPLAY"; print=inkscape --print='|lp' '%s''
-1222022944[8a55eb0]: Current entry: 'video/mpeg; xine '%s'; description="MPEG Video"; test=test -n "$DISPLAY"'
-1222022944[8a55eb0]: Current entry: 'application/x-bittorrent; /usr/bin/btdownloadgui --responsefile '%s'; test=test -n "$DISPLAY"'
-1222022944[8a55eb0]: Current entry: 'application/x-bittorrent; /usr/bin/btdownloadcurses --responsefile '%s'; test=test -z "$DISPLAY"; needsterminal'
-1222022944[8a55eb0]: Current entry: 'application/pdf; evince '%s'; test=test -n "$DISPLAY" ; nametemplate=%s.pdf'
-1222022944[8a55eb0]: The real handler is: 'evince '%s''
-1222022944[8a55eb0]: -- UnescapeCommand
-1222022944[8a55eb0]: Command to escape: 'test -n "$DISPLAY" '
-1222022944[8a55eb0]: UnescapeCommand really needs some work -- it should actually do some unescaping
-1222022944[8a55eb0]: Escaped command: 'test -n "$DISPLAY" '
-1222022944[8a55eb0]: Running Test: test -n "$DISPLAY" 
-1222022944[8a55eb0]: Handler/Description results:  handler='evince', description='', mozillaFlags=''
-1222022944[8a55eb0]: -- nsOSHelperAppService::GetFileTokenForPath: 'evince'
-1222022944[8a55eb0]: OS gave back 0x9927420 - found: 1
-1222022944[8a55eb0]: Data source: Via type: retval 0x80040111
-1222022944[8a55eb0]: Data source: Via ext: retval 0x80040111
-1222022944[8a55eb0]: Extension 'pdf' matches mime info: 1
-1222022944[8a55eb0]: MIME Info Summary: Type 'application/pdf', Primary Ext 'pdf'
-1222022944[8a55eb0]: Type/Ext lookup found 0x9927420
Ah, I see what's going on...

Basically, we don't get a _handler_ for application/pdf.  But we do fine extensions, since we call LookUpExtensionsAndDescription.  I'll see about fixing that when I get back.

Thank you for the log!
Attached patch This ought to do it (obsolete) — Splinter Review
Attachment #260147 - Flags: review?
Priority: -- → P2
Summary: /etc/mailcap takes precedence on GNOME mime preferences → [FIX]/etc/mailcap takes precedence on GNOME mime preferences
Target Milestone: --- → mozilla1.9alpha4
Comment on attachment 260147 [details] [diff] [review]
This ought to do it

Mike, do you also want to try to get this in on the branch?
Attachment #260147 - Flags: superreview?(cbiesinger)
Attachment #260147 - Flags: review?(cbiesinger)
Attachment #260147 - Flags: review?
+    // No useful data yet.  Assume that if the GNOME registry gives us anything
+    // it'll also give a sane list of extensions and a sane description so we
+    // don't have to look in mime.types files.  User mime.types files are rare
+    // anyway.

This is false: the gnome registry doesn't return extensions list in recent gnomevfs versions, while it returns descriptions.

(In reply to comment #3)
> (From update of attachment 260147 [details] [diff] [review])
> Mike, do you also want to try to get this in on the branch?

It'd be nice to have this on branch, yes.
Hmm...  We call _gnome_vfs_mime_get_extensions_list with the given type.  Is that just a no-op now or something?

We use this code in a pretty serious way to map a type to valid extensions for the type, so we need to be sure not to break that.
(In reply to comment #5)
> Hmm...  We call _gnome_vfs_mime_get_extensions_list with the given type.  Is
> that just a no-op now or something?

That's exactly that: it is a no-op nowadays. 

See comment #34 on bug #273524
Comment on attachment 260147 [details] [diff] [review]
This ought to do it

Ugh.  So on the one hand GNOME does handler dispatch based on extension if you double-click a file, on the other hand it now doesn't allow apps to figure out what the right extension for a given type is.  Lovely.  Where do I go to file bugs on this inanity?  ;)

That basically means all this code needs to be redesigned; we need to get _most_ information from GNOME, but the extensions from elsewhere...
Attachment #260147 - Flags: superreview?(cbiesinger)
Attachment #260147 - Flags: superreview-
Attachment #260147 - Flags: review?(cbiesinger)
Attachment #260147 - Flags: review-
I guess the patch in bug 273524 has something along the lines of what we need here...  I'll go ahead and steal that. ;)
(In reply to comment #7)
> (From update of attachment 260147 [details] [diff] [review])
> Ugh.  So on the one hand GNOME does handler dispatch based on extension if you
> double-click a file, on the other hand it now doesn't allow apps to figure out
> what the right extension for a given type is.  Lovely.  Where do I go to file
> bugs on this inanity?  ;)

There is no bug there. GNOME doesn't care about extensions. It cares about mime types. And mime type is guessed by sniffing the file contents, not by its extensions. This is not windows.
> There is no bug there. GNOME doesn't care about extensions.

Would that it were so!  I just tried this -- took a PDF file, renamed it to have a .gif extension, then opened Nautilus.  It showed the "generic GIF" GIF icon, and double-clicking on the file gave an error dialog about the extension and contents not matching (which is a step up from how I recall this working), but it did NOT open my file, nor did it give an option to do that (short of renaming the file)...  So yes, things are a little better than Windows.  But not enough better that we can save content with random extensions and have it Just Work.  :(
Mike, thank you for pointing out the problem and for the code that fixes it.
Attachment #260147 - Attachment is obsolete: true
Attachment #260203 - Flags: superreview?(cbiesinger)
Attachment #260203 - Flags: review?(cbiesinger)
(In reply to comment #10)
> > There is no bug there. GNOME doesn't care about extensions.
> 
> Would that it were so!  I just tried this -- took a PDF file, renamed it to
> have a .gif extension, then opened Nautilus.  It showed the "generic GIF" GIF
> icon, and double-clicking on the file gave an error dialog about the extension
> and contents not matching (which is a step up from how I recall this working),
> but it did NOT open my file, nor did it give an option to do that (short of
> renaming the file)...  So yes, things are a little better than Windows.  But
> not enough better that we can save content with random extensions and have it
> Just Work.  :(

I don't know what kind of ancient version of gnome you are using, but here, i can rename a pdf file with a gif extension and still see it as a pdf file, and launch evince when clicking it...
(In reply to comment #11)
> Created an attachment (id=260203) [details]
> Better extension handling
> 
> Mike, thank you for pointing out the problem and for the code that fixes it.

I'll update the patch to bug #273524 when this lands
I'm using Fedora Core 4.  As are many of our users.
Comment on attachment 260203 [details] [diff] [review]
Better extension handling

sorry for the delay
Attachment #260203 - Flags: superreview?(cbiesinger)
Attachment #260203 - Flags: superreview+
Attachment #260203 - Flags: review?(cbiesinger)
Attachment #260203 - Flags: review+
Checked in on trunk.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Comment on attachment 260203 [details] [diff] [review]
Better extension handling

It might be worth fixing this on the 1.8 branch.  This fixes a pretty serious user-experience issue on modern Linux distros.  The patch is pretty safe; I would be surprised in the extreme if it causes regressions.

That said, it might make sense to land it for 1.8.1.5, not 1.8.1.4 given the timeframe here.  I just don't have a way to request approval for that release.  :(
Attachment #260203 - Flags: approval1.8.1.4?
Comment on attachment 260203 [details] [diff] [review]
Better extension handling

approved for 1.8.1.4, a=dveditz for release-drivers
Attachment #260203 - Flags: approval1.8.1.4? → approval1.8.1.4+
Fixed on branch.
Keywords: fixed1.8.1.4
hi boris, mike... got a test case or repro scenario that QA can use to verify this fix?  Or is this a scenario that only devs can unit test and verify?   If so, please verify it against the latest 2.0.0.4 branch and mark as verified1.8.1.4.  Thanks
Whiteboard: [need testcase]
Tony, this should work to reproduce this bug.  Note that the bug is Linux-only.

1) Make sure you have no plug-in that handles application/pdf.
2) Set up an application/pdf handler in the GNOME preferences.
3) Make sure the file /etc/mime.types exists and contains the line:

application/pdf                 pdf

4) Load an application/pdf file.

The resulting dialog should offer to use the handler you set up in step 2.  This bug was about it not doing so.

You can use some other type instead of PDF, of course.
I would add a 3.5 step: Make sure the file /etc/mailcap contains an entry for application/pdf
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: