fix: sanitize "/" in comic titles to prevent nested directory creation #3

Open
opened 2026-03-10 15:06:56 +00:00 by bryan · 0 comments
Owner

When a comic title contains a forward slash (e.g. "Batman/Static Beyond 001"), it is not sanitized before being used as a filesystem path. This causes the library to create nested directories instead of a single folder.

Steps to reproduce:

yoink https://readallcomics.com/batman-static-beyond-001-2026/

Expected output:

<library>/Batman Static Beyond 001/Batman Static Beyond 001.cbz

Actual output:

<library>/batman/static beyond 001/batman/Static Beyond 001.cbz  (3 nested folders)

Fix: Strip or replace / (and any other path-unsafe characters) when constructing the title-derived directory and filename.

When a comic title contains a forward slash (e.g. "Batman/Static Beyond 001"), it is not sanitized before being used as a filesystem path. This causes the library to create nested directories instead of a single folder. **Steps to reproduce:** ``` yoink https://readallcomics.com/batman-static-beyond-001-2026/ ``` **Expected output:** ``` <library>/Batman Static Beyond 001/Batman Static Beyond 001.cbz ``` **Actual output:** ``` <library>/batman/static beyond 001/batman/Static Beyond 001.cbz (3 nested folders) ``` **Fix:** Strip or replace `/` (and any other path-unsafe characters) when constructing the title-derived directory and filename.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bryan/yoink-go#3