Nextcloud version (eg, 20.0.5): 23.0.3
Operating system and version (eg, Ubuntu 20.04): official docker
Apache or nginx version (eg, Apache 2.4.25): apache image
PHP version (eg, 7.4): 8.x
The issue you are facing:
Is this the first time you’ve seen this error? (Y/N): y
Steps to replicate it:
choose existing folder with some files
create new .md file
use same naming convention for existing and new files (in my case yyyymmdd_.
I looks like new files are sorted between of existing files when sorted by name - but the name following ** yyyymmdd_.** should make files sort by date prefix… (sort by modification date works as expected)
…and if I understand the system correctly, 20180115 is sorted after 202301 because it is a larger number.
EDIT: you can test this on the command line:
using the ls command with the default alphabetical order:
$ ls -l
insgesamt 0
-rw-r--r-- 1 user user 0 3. Jan 06:44 20221201_hjdjhasdad
-rw-r--r-- 1 user user 0 3. Jan 06:44 20221202_djhasdad
-rw-r--r-- 1 user user 0 3. Jan 06:44 20221210_dfsfjskfjsdjhasdad
-rw-r--r-- 1 user user 0 3. Jan 06:44 202301_dfsfjskfjsdjhasdad
using the ls command with the -v option for a natural sort of (version) numbers within text:
$ ls -lv
insgesamt 0
-rw-r--r-- 1 user user 0 3. Jan 06:44 202301_dfsfjskfjsdjhasdad
-rw-r--r-- 1 user user 0 3. Jan 06:44 20221201_hjdjhasdad
-rw-r--r-- 1 user user 0 3. Jan 06:44 20221202_djhasdad
-rw-r--r-- 1 user user 0 3. Jan 06:44 20221210_dfsfjskfjsdjhasdad
you must be right, thank you! looks I have to adopt another naming convention for my file adding a character e.g. dot between date parts makes it sort right!