! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Thunar does not properly sort filenames that contain long numbers.
Status:
RESOLVED: FIXED

Comments

Description Justin Jacobs 2011-10-10 15:11:17 CEST
Created attachment 3892 
use guint64 when sorting numerical files

I have thousands of files that have are named with 12-digit numbers (i.e. 124189329948.jpg). When converted to an integer for sorting, this number is too big for the type that is used to store it (guint). This results in these files not being sorted as they should (however, /bin/ls and pcmanfm sort them properly). I've written a patch that fixes this problem.
Comment 1 Heiko Baums 2011-11-16 18:49:49 CET
I tried this patch, but it doesn't help.

See e.g. the directory ~/.mozilla/firefox/<...>/extensions. In this directory are directories and files with file names like {5e8fc08b-0ba2-4547-ba1d-8ced12c8604d}. Those directories and files are still in wrong sort order. Or see mldonkey's temp directory which also contains files with hex hashes in their file names.
Comment 2 Justin Jacobs 2011-11-16 20:08:58 CET
Heiko, that patch only changes the length limit of consecutive numbers in a file name. The problem you're describing with alphanumeric file names sounds like a different bug. Even so, I tried to reproduce your problem with my Firefox extensions folder, but the folders and files that I had were sorted properly.
Comment 3 Heiko Baums 2011-11-16 22:18:14 CET
I'm not quite sure if these are two different issues, because there are several other sorting issues in Thunar. So I guess sorting is a general problem and the sorting algorithms in Thunar seem to be not the best in general.

Regarding the sorting of files with a lot of numbers in the file names is not only limited to files whose file names are just numbers, but files whose file names contain a lot of numbers, decimal as well as hexadecimal.

And I would change the platform to All.
Comment 4 Jannis Pohlmann editbugs 2012-03-26 22:44:45 CEST
This appears to be related to bug #5359, which we recently fixed. We now support numbers of arbitrary length. I am thus marking this bug as fixed.

Bug #8022

Reported by:
Justin Jacobs
Reported on: 2011-10-10
Last modified on: 2012-03-26

People

Assignee:
Jannis Pohlmann
CC List:
1 user

Version

Attachments

Additional information