Bug 363626

Summary: JPG files aren't shown by default in the open dialog, *.jfif files are
Product: [Applications] krita Reporter: rkfg
Component: File formatsAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED NOT A BUG    
Severity: normal CC: halla
Priority: NOR    
Version First Reported In: 3.0 Release Candidate   
Target Milestone: ---   
Platform: Debian testing   
OS: Linux   
URL: http://files.kde.org/krita/3/linux/devbuilds/krita-3.0-RC-1-master-4af9e8d-x86_64.appimage
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: screenshot of krita opening jpg
No jpegs
Jpegs are here when filtered by webp

Description rkfg 2016-05-28 11:54:38 UTC
Filtering by the filetype looks broken as there are no *.jpg files visible when "All supported formats" is chosen.

Reproducible: Always

Steps to Reproduce:
1. Press Ctrl+O
2. Navigate to a directory with jpegs


Actual Results:  
No jpegs are available for opening.

Expected Results:  
All files that are actually supported should not be filtered out.

It could be circumvented by chosing "webp" file format, though then you'll also get all other files like *.log, *.txt, binary files like *.o and what not. Choosing image/jpeg doesn't help to show only jpegs (as it suggests). PNG and GIF files are shown normally, probably other than JPG formats are fine, too.
Comment 1 Halla Rempt 2016-05-28 14:44:04 UTC
Created attachment 99229 [details]
screenshot of krita opening jpg

Hm, works here on OpenSUSE with Gnome 3. Which desktop environment do you use and can you show me a screenshot of the file dialog?
Comment 2 rkfg 2016-05-28 16:27:55 UTC
Created attachment 99231 [details]
No jpegs

I don't use any DE, instead I have Awesome WM.
Comment 3 rkfg 2016-05-28 16:28:28 UTC
Created attachment 99232 [details]
Jpegs are here when filtered by webp
Comment 4 rkfg 2016-06-20 06:18:40 UTC
For whatever reason when I attempt to save a jpeg file Krita suggests to save it as a *.jfif file. It also shows files with such an extension when "All supported formats" is selected.
Comment 5 rkfg 2016-06-20 09:57:45 UTC
Okay, something should be wrong with my user. Ran Krita from root and another clear one and they see *.jpg. Will try to search for culprits.
Comment 6 rkfg 2016-06-20 10:04:17 UTC
Found it. The problematic file is ~/.local/share/mime/packages/x-wine-extension-jfif.xml

Contents:

<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
  <mime-type type="image/jpeg">
    <glob pattern="*.jfif"/>
    <comment>JPEG Image</comment>
  </mime-type>
</mime-info>

After removing it and executing 'update-mime-database ~/.local/share/mime' it all works as expected. Weird, because I haven't got any problems with other apps. Maybe they just don't use MIME.