Skip to content

CBZ pages in the wrong order (10.jpg before 2.jpg etc.) depending on image filename format #1549

@advert665

Description

@advert665

Describe the bug
When viewing CBZ files, if the images are named e.g. 1.jpg, 2.jpg, ... 10.jpg etc., they display in the wrong order with 10 coming before 2 and so on. I presume this is due to the ordering algorithm being used as files named 001.jpg, 002.jpg, ... 010.jpg display correctly. No other CBZ reader I have used displays this behaviour.

To Reproduce
Steps to reproduce the behavior:

  1. Create a CBZ file with image names 1.jpg through 10.jpg.
  2. Open the file with foliate.
  3. Notice that 10.jpg comes before 2.jpg.

Expected behavior
The expected behaviour is that 2.jpg displays before 10.jpg. This is standard behaviour in MComix, Okular, Calibre, Evince, Panels (iOS), CDisplayEX (Android), and many others.

Screenshots
If applicable, add screenshots to help explain your problem.

Version:

  • Foliate version: 3.3.0
  • OS/Distribution and version: NixOS 25.05
  • Desktop environment: Gnome 48
  • Installation method: Nixpkgs

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions