[GH-ISSUE #88] OSError: [Errno 36] File name too long #17

Closed
opened 2026-10-13 19:45:47 +00:00 by bsakaguchi · 2 comments
Owner

Originally created by @spapost on GitHub (Jan 10, 2026).
Original GitHub issue: https://github.com/Glitchy-Sheep/boosty-downloader/issues/88

Originally assigned to: @Glitchy-Sheep on GitHub.

When the post name is very long, mkdir fails with error [Errno 36] File name too long

Possible fix - restricting total post name length before passing the argument to mkdir:

boosty_downloader/src/application/use_cases/download_all_posts.py

post_dto.title = (
                    sanitize_string(post_dto.title).replace('.', '').strip()
                )
post_dto.title = post_dto.title[:100]

boosty_downloader/src/application/use_cases/download_specific_post.py

post_name = (
                        f'{post.created_at.date()} - {post.title} ({post.id[:8]})'
                    )
post_name = sanitize_string(post_name).replace('.', '').strip()
post_name = post_name[1:100]
Originally created by @spapost on GitHub (Jan 10, 2026). Original GitHub issue: https://github.com/Glitchy-Sheep/boosty-downloader/issues/88 Originally assigned to: @Glitchy-Sheep on GitHub. When the post name is very long, mkdir fails with error [Errno 36] File name too long Possible fix - restricting total post name length before passing the argument to mkdir: boosty_downloader/src/application/use_cases/download_all_posts.py ``` post_dto.title = ( sanitize_string(post_dto.title).replace('.', '').strip() ) post_dto.title = post_dto.title[:100] ``` boosty_downloader/src/application/use_cases/download_specific_post.py ``` post_name = ( f'{post.created_at.date()} - {post.title} ({post.id[:8]})' ) post_name = sanitize_string(post_name).replace('.', '').strip() post_name = post_name[1:100] ```
bsakaguchi 2026-10-13 19:45:47 +00:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@Glitchy-Sheep commented on GitHub (Jan 13, 2026):

Yeah, for some really long titles it could be reasonable, thank you!

I think I'll investigate this soon.
The fix could automatically strip only for too long names, so already existing post directories won't duplicate with different names.

How often do you encounter this?

<!-- gh-comment-id:3742479235 --> @Glitchy-Sheep commented on GitHub (Jan 13, 2026): Yeah, for some really long titles it could be reasonable, thank you! I think I'll investigate this soon. The fix could automatically strip only for too long names, so already existing post directories won't duplicate with different names. How often do you encounter this?
Author
Owner

@spapost commented on GitHub (Jan 16, 2026):

Just a couple of time, fortunately, and for a particular author, who appends English translation for the title

<!-- gh-comment-id:3761494419 --> @spapost commented on GitHub (Jan 16, 2026): Just a couple of time, fortunately, and for a particular author, who appends English translation for the title
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Glitchy-Sheep/boosty-downloader#17
No description provided.