Skip to content

Don't set a content-type that isn't certain

Bastien Nocera requested to merge wip/hadess/fast-content-type into master

Don't ignore the result_uncertain flag from g_content_type_guess() as it might cause nautilus to incorrectly think that a particular file is of a certain type, and never check its magic.

Test case:

  • Put multi-page DjVu file on a remote filesystem (file will have DJVM in the first few bytes of data, rather than DJVU as used for images)
  • Make sure evince is installed with DjVu support
  • Double-click on file

What's supposed to happen is nautilus, having only got a "fast" content-type will check the file's magic before choosing whether it's an image or a document, and the file will be launched in evince (maybe it will even get thumbnailed).

This already works correctly on the local filesystem.

Merge request reports