Menu

#980 Wrong ordering of files

1.2
open
nobody
None
5
2015-12-24
2015-09-04
Sworddragon
No

I'm using PCManFM 1.2.3 and I'm noticing that files are not correctly sorted. For example if I have the 3 files 0, 01 and 1 in a directory they are sorted as 0, 1, 01 while I would expect them to be sorted as 0, 01, 1.

Discussion

  • Lonely Stranger

    Lonely Stranger - 2015-12-11

    I believe it is the same issue as [#978], in "ignore-letter-case" mode sorting is done in somewhat different manner, where numbers are treated as numbers, not just chars. You may want to turn ignore case sorting off to get sort order you wanted. Thank you very much.

     

    Related

    Bugs: #978

  • Sworddragon

    Sworddragon - 2015-12-12

    I think the main problem would then be that somebody would not expect that case-insensitivity would also have some effect on non-letters.

     

    Last edit: Sworddragon 2015-12-12
  • Lonely Stranger

    Lonely Stranger - 2015-12-21

    Well, that is how case-insensitive comparizon is done in the GLib function g_utf8_collate_key_for_filename() which, I believe, is used everywhere in GTK+ programs and using g_utf8_collate_key() is inappropriate as it will sort files in order such as Docs .dots Drive .dri.z, i.e. ignoring dots, so there is very little we can do with it. Although point taken, I'll document it at the Wiki later. Thank you very much.

     
  • Sworddragon

    Sworddragon - 2015-12-24

    The problem would still be that somebody enabling in the menu bar -> View -> "Sort Files" -> "Ignore Name Case" would not expect to get more than just ignoring case-sensitivity. The documentation of g_utf8_collate_key_for_filename ( https://developer.gnome.org/glib/stable/glib-Unicode-Manipulation.html#g-utf8-collate-key-for-filename ) does also say that a . is treated special besides of the intelligent ordering of numbers (but it doesn't say something about being case-insensitive). I think the entry "Ignore Name Case" should also be reworded to better reflect what it is doing.

    Edit: I have forwarded this issue now to the GNOME bugtracker ( https://bugzilla.gnome.org/show_bug.cgi?id=759832 ) because I think that "01" should be before "1".

     

    Last edit: Sworddragon 2015-12-24

Anonymous
Anonymous

Add attachments
Cancel