mirror of
https://github.com/afkarxyz/SpotiFLAC.git
synced 2026-04-26 07:35:52 +03:00
[GH-ISSUE #213] Download is failing when there is space at the end of the playlist name #183
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/SpotiFLAC#183
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @zappthed on GitHub (Dec 31, 2025).
Original GitHub issue: https://github.com/afkarxyz/SpotiFLAC/issues/213
Download is failing when there is space at the end of the playlist name, as Windows automatically deletes the space in the name at the end of a folder automatically.
failed to create file: open c:\users\zappthed\music\daniel caesar, etc. \get you (feat. kali uchis) - daniel caesar, kali uchis.flac: the system cannot find the path specified.It shows folder directory with space at
When it should've been
@SjxSubham commented on GitHub (Jan 1, 2026):
Well, I have found the root cause of this ISsue and approached a solution too that will fix the ISSUE everywhere.
Based on my analysis
The problem is at
sanitizePathfunction inside theutills.tsfile . This fn only removes invalid characters from folder names, but it does not trim trailing spaces from the path.@afkarxyz A single line of change can fix it. Although I'm raising a PR regarding the fixes Let me know should i make contribute in this repo via this change or You alone can fix it your next update ...!
sanitizePathThis function is called in multiple places throughout the codebase (in useDownload.ts, useLyrics.ts, and useCover.ts) when building the output directory path for playlist downloads, so I think fixing it in utils.ts will resolve the issue everywhere.