kindle-send
kindle-send copied to clipboard
Inconsistent handling of missing images
Describe the bug
When a website contains an embedded image, but the image resource is unavailable, kindle-send
handles the situation differently on Linux and Windows.
On Linux. the message is reasonable. After raising this message, kindle-send
creates a non-empty epub file.
Couldn't add image <imageurl> : Error retrieving <imageurl> from source: Error retrieving
On Windows, the message seems off. kindle-send
skipps not just the image, put the pages that includes the missing resource.
SKIPPING <pageurl> : Error retrieving <imageurl> from source:
open <imageurl>: Die Syntax für den Dateinamen, Verzeichnisnamen oder die Datenträgerbezeichnung ist falsch.
cannot get file, bad return code
missing data prefix
The german text means "syntax for the file name is invalid"
To Reproduce
On Linux:
./kindle-send download https://volkerwestphal.github.io/kindle-send-tests/blog-invalid-img-png.html
./kindle-send download https://volkerwestphal.github.io/kindle-send-tests/blog-invalid-img-svg.html
On Windows:
kindle-send.exe download https://volkerwestphal.github.io/kindle-send-tests/blog-invalid-img-png.html
kindle-send.exe download https://volkerwestphal.github.io/kindle-send-tests/blog-invalid-img-svg.html
Expected behavior
The behaviour of kindle-send
on Linux seems right. It skips over non-existing resources and continues the job.
Additional context
- Tested using kindle-send 2.0.0-rc-2
- The behavior was tested with image formats png (considered supported) and svg (considered unsupported). Makes no difference.
- When fetching only a single url,
kindle-send
leaves an empty (zero byte length) epub file behind.