Skip to content

Bug Report: Directory Sorting Treats Numbers as Strings #136

@amaljoseph

Description

@amaljoseph

Description:
When listing directories in the Image Gallery, folders with numbers in their names are sorted lexicographically (as strings). For example, instead of displaying as path/64, path/128, the gallery shows path/128 before path/64.

Expected Behavior:
Directories with numeric values in their names should be sorted numerically.
For example:

Correct order: path/64, path/128

Actual order: path/128, path/64

Steps to Reproduce:

Create directories named with numbers, such as 64 and 128.

Open the parent directory in the Image Gallery.

Observe that the ordering incorrectly puts 128 before 64.

Suggested Solution:
Implement natural sorting (numeric-aware sorting) for directory names so numbers are ordered properly.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions