Bug 195004 - Konqueror not displaying files in proper order
Summary: Konqueror not displaying files in proper order
Status: RESOLVED DUPLICATE of bug 169883
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 16.12.2
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Peter Penz
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-02 18:09 UTC by ancow
Modified: 2009-06-02 20:10 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
list of filenames to reproduce the bug (1.63 KB, text/plain)
2009-06-02 18:10 UTC, ancow
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ancow 2009-06-02 18:09:01 UTC
Version:           4.2.4 (KDE 4.2.4) (using 4.2.4 (KDE 4.2.4), Kubuntu packages)
Compiler:          cc
OS:                Linux (i686) release 2.6.28-12-generic

In certain cases, konqueror will not sort files according to their names. The order in which files appear is not random, as reloading the folder/closing konqueror and re-opening results in the same incorrect results.

To reproduce:
 - create a new folder
 - open konsole and cd to the folder you just created
 - execute "for i in $(cat bad_order); do touch $i; done", where "bad_order" is a text file containing the file names I will post below
 - open the folder in konqueror (list view or symbol view doesn't make a difference)
 - some files named 47* are above some named 49* and some are below

I'd like to point out that this occurs in a real-world scenario for me. Due to the sensitive nature of the filenames I created this way to reproduce the bug without using the original file names.
Comment 1 ancow 2009-06-02 18:10:27 UTC
Created attachment 34202 [details]
list of filenames to reproduce the bug
Comment 2 Frank Reininghaus 2009-06-02 20:10:51 UTC
Thanks for the bug report! A simpler way to reproduce would be

touch 1aa 2aa 11a

The problem seems to be that the "Natural Compare" function tries to sort the files as clever as possible - in the present case, it detects that the file names start with numbers, so it sorts "1*" before "11*" (or "49*" before "475*", where '*' contains only letters). While "Natural Compare" yields good results most of the time, there are cases (like yours) where the result is rather unexpected. However, it's not possible at the moment to disable this kind of sorting.

This issue has actually been reported before, I'll mark it as a duplicate.

*** This bug has been marked as a duplicate of bug 169883 ***