Skip to content
YACReader
Did you find a bug? Splash it!

A folder named JPEG is mistaken for an image

  • tr4v3l3r
  • Topic Author
  • Offline
  • New Member
  • New Member
More
1 week 4 days ago #10325 by tr4v3l3r
In YACReader 10.4.0 Flatpak on Linux, a valid CBR fails to open with “Unknown error opening the file”, and its cover thumbnail cannot be generated.

The libarchive backend returns an internal directory named JPEG without a trailing slash. FileComic::isSupportedImage() accepts any name ending in jpeg, so it mistakenly treats this directory as an image.

The directory sorts before the actual images and is selected as the cover. Reading its empty contents triggers the error.

Expected behavior: exclude directories from comic pages and match complete file extensions, including the dot.

Minimal test case: attached bug-JPEG.cbr, containing one valid PNG and an explicit directory entry:
Code:
$ unrar l bug-JPEG.cbr Attributes      Size  Name ----------- --------- ----------------     ..A....      1701  JPEG/001.png     ...D...        0  JPEG ----------- --------- ----------------                 1701  2 entries
File link:  file.kiwi/dbf00e24#iD25HzSELnr6c8jkxt3lAw
Affected code in 10.4.0
The following user(s) said Thank You: Luis Ángel

Please Log in or Create an account to join the conversation.

Moderators: Luis Ángel
Powered by Kunena Forum

Thanks for downloading YACReader!

Your download is starting.

YACReader for iOS and Android

Connect to YACReaderLibrary to browse, read remotely and import comics. Your reading progress is synchronized across devices.

Download on the App Store Get it on Google Play Available at Amazon Appstore

Discover all the features on the iOS and Android pages, and learn how to use them in the iOS and Android user guides.

Support YACReader

YACReader for desktop and server is free to use, but it is not free to develop: maintaining this website, developer programs, code signing certificates, test devices and, of course, all the time it takes. Less than 0.01% of downloads end in a donation, so any amount counts.

By supporting the project you help keep it regularly updated and, most importantly, alive. Thanks!