Bug 249878 - Gwenview does not show folders or files called "nef", "cr2" or "new"
Summary: Gwenview does not show folders or files called "nef", "cr2" or "new"
Status: RESOLVED FIXED
Alias: None
Product: gwenview
Classification: Applications
Component: general (show other bugs)
Version: 2.4
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Gwenview Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-02 12:44 UTC by SeeSchloss
Modified: 2012-10-19 13:26 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Only filter actual extensions of actual files (790 bytes, patch)
2010-09-02 12:44 UTC, SeeSchloss
Details

Note You need to log in before you can comment on or make changes to this bug.
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