Bug 249878

Summary: Gwenview does not show folders or files called "nef", "cr2" or "new"
Product: [Applications] gwenview Reporter: SeeSchloss <see.kde>
Component: generalAssignee: Gwenview Bugs <gwenview-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: KaiUweBroulik2, see.kde
Priority: NOR    
Version: 2.4   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Only filter actual extensions of actual files

Description SeeSchloss 2010-09-02 12:44:45 UTC
Created attachment 51219 [details]
Only filter actual extensions of actual files

Version:           2.4 (using KDE 4.5.0) 
OS:                Linux

Gwenview filters "backlisted extensions" a bit too liberaly:
- folders are also filtered even though folder extensions make no sense
- when a file has no extension, its complete name is considered an extension

This is especially problematic for "new", which is a rather common name for folders.

Reproducible: Always

Steps to Reproduce:
$ mkdir -p /tmp/gwenviewtest/{test,new,test.cr2}
$ touch /tmp/gwenviewtest/nef
$ gwenview /tmp/gwenviewtest

Actual Results:  
Gwenview only shows one folder, "test".

Expected Results:  
Gwenview should show all files:

Folder "new" and file "nef" should not be blacklisted in any case.
I think "test.cr2" should not be blacklisted either, but I am less sure about it.

Looking at the SVN repos, the blacklisted extensions are defined in "gwenview/lib/gwenviewconfig.kcfg" but I have not been able to find this file on my filesystem, or any other way to change this list myself.
Comment 1 Kai Uwe Broulik 2010-09-02 14:59:15 UTC
Why is new and nef blacklisted anyway? Not an image file format? Tried naming a folder “test.txt” or so?
Comment 2 SeeSchloss 2010-09-02 15:09:12 UTC
This is the explanation found in gwenviewconfig.kcfg, below the list which contains "nef,cr2,new":

A list of filename extensions Gwenview should not try to load. This is useful to exclude raw files which are recognized as TIFF or JPEG. We exclude *.new as well because this is the extension used for temporary files by KSaveFile.


A folder called "test.txt" will be displayed fine, any file or folder that is not exactly one of these extensions or that does not end in ".<extension>" is displayed.
Comment 3 Kai Uwe Broulik 2010-09-02 15:10:20 UTC
Yes, i noticed it. Looks like they forgot a check whether the file to be filtered is a folder or file.
Comment 4 SeeSchloss 2010-09-02 15:20:24 UTC
Not only that, but also a check that the file actually has an extension, it makes no sense to filter out a file called "new" just because the .new extension should be hidden.
Comment 5 Aurelien Gateau 2010-09-04 00:31:08 UTC
SVN commit 1171472 by gateau:

Apply black-list extension filter to documents only.

BUG:249878

 M  +7 -5      sorteddirmodel.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1171472
Comment 6 Aurelien Gateau 2010-09-04 00:33:58 UTC
SVN commit 1171476 by gateau:

Apply black-list extension filter to documents only.

BUG:249878

 M  +7 -5      sorteddirmodel.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1171476