ytdl-sub/src/ytdl_sub
Nojyto 658f5ef3e1
Some checks failed
ytld-sub CI (Linux) / test-lint (push) Has been cancelled
ytld-sub CI (Linux) / test-unit (push) Has been cancelled
ytld-sub CI (Windows) / test-unit (push) Has been cancelled
ytld-sub CI (Windows) / test-integration (push) Has been cancelled
ytld-sub CI (Windows) / test-integration-prebuilt-presets (push) Has been cancelled
ytld-sub CI (Windows) / test-e2e (push) Has been cancelled
ytld-sub CI (Linux) / test-integration (push) Has been cancelled
ytld-sub CI (Linux) / test-integration-prebuilt-presets (push) Has been cancelled
ytld-sub CI (Linux) / test-e2e (push) Has been cancelled
ytld-sub Docker GUI Build / version (push) Has been cancelled
ytld-sub Docker GUI Build / build (3.12) (push) Has been cancelled
ytld-sub Docker Ubuntu Build / version (push) Has been cancelled
ytld-sub Docker Ubuntu Build / build (3.12) (push) Has been cancelled
ytld-sub Docker Build / version (push) Has been cancelled
ytld-sub Docker Build / build (3.12) (push) Has been cancelled
ytld-sub Release / version (push) Has been cancelled
ytld-sub CI (Linux) / codecov-upload (push) Has been cancelled
ytld-sub Docker GUI Build / package-arm64 (push) Has been cancelled
ytld-sub Docker GUI Build / package-amd64 (push) Has been cancelled
ytld-sub Docker GUI Build / deploy (push) Has been cancelled
ytld-sub Docker Ubuntu Build / package-arm64 (push) Has been cancelled
ytld-sub Docker Ubuntu Build / package-amd64 (push) Has been cancelled
ytld-sub Docker Ubuntu Build / deploy (push) Has been cancelled
ytld-sub Docker Build / package-arm64 (push) Has been cancelled
ytld-sub Docker Build / package-amd64 (push) Has been cancelled
ytld-sub Docker Build / deploy (push) Has been cancelled
ytld-sub Release / build-linux (push) Has been cancelled
ytld-sub Release / build-windows (push) Has been cancelled
ytld-sub Release / github-release (push) Has been cancelled
ytld-sub Release / pypi-publish (push) Has been cancelled
[BUGFIX] Fix "File name too long" error when a title is used as a folder name (#1479)
Some presets put the video title into a folder name (not just the file name). The code only shortened the file name, never the folder name. So a title with multi-byte characters (like bold/fancy Unicode, which take 4 bytes each) could make the folder name go over the OS 255-byte limit and crash with OSError: [Errno 36] File name too long.

This fix shortens every folder in the path too, not just the file name, while keeping the file extension. output_directory is left alone so real folders aren't touched.

Added a test with a title made of 4-byte bold Unicode characters.

Relates to #1092, #1189

-- Thanks @Nojyto for the contribution!
2026-06-23 09:05:10 -07:00
..
cli [FEATURE] inspect subcommand (#1407) 2026-04-13 10:10:58 -07:00
config [FEATURE] inspect subcommand (#1407) 2026-04-13 10:10:58 -07:00
downloaders [DEV] Linter: Use ruff over black and isort (#1445) 2026-03-09 11:39:01 -07:00
entries [DEV] Make inspect resolution more human readable (#1451) 2026-03-13 16:27:56 -07:00
plugins [DEV] Linter: Use ruff over black and isort (#1445) 2026-03-09 11:39:01 -07:00
prebuilt_presets [DEV] Linter: Use ruff over black and isort (#1445) 2026-03-09 11:39:01 -07:00
script [BUGFIX] Fix output sanitization type checking (#1467) 2026-05-10 09:19:27 -07:00
subscriptions [FEATURE] inspect subcommand (#1407) 2026-04-13 10:10:58 -07:00
thread [DEV] Linter: Use ruff over black and isort (#1445) 2026-03-09 11:39:01 -07:00
utils [BUGFIX] Fix "File name too long" error when a title is used as a folder name (#1479) 2026-06-23 09:05:10 -07:00
validators [BUGFIX] Fix "File name too long" error when a title is used as a folder name (#1479) 2026-06-23 09:05:10 -07:00
ytdl_additions [DEV] Linter: Use ruff over black and isort (#1445) 2026-03-09 11:39:01 -07:00
__init__.py [DOCKER] GUI Docker image using Code-Server (#774) 2023-10-22 01:17:09 -07:00
main.py [FEATURE] inspect subcommand (#1407) 2026-04-13 10:10:58 -07:00