Skip to content

Never save a downloaded song outside the download location - #409

Merged
hatstand merged 1 commit into
masterfrom
claude/project-thread-wugi27-download-dot-names
Nov 9, 2026
Merged

hatstand merged 1 commit into
masterfrom
claude/project-thread-wugi27-download-dot-names

Conversation

@hatstand

@hatstand hatstand commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Song downloads build their folders from the playlist, artist and album names Clementine sends, and the file name from the song's filename. Utilities.removeInvalidFileCharacters takes out / and other characters, but not dots. So a name like .. named the folder above, and a Clementine with such tags, or a rogue one, could have songs saved outside Clementine Remote's folder. This affects Android 9 and earlier, where FileDownloadStorage writes files. On Android 10 and later, MediaStore controls the path.

Names made only of dots are now dropped, the same way empty names already are. If the file name is left empty, the song's title is used instead, as the iOS client does.

Synced songs were already safe: SyncFiles.part trims dots and replaces separators.

The same change for iOS is iOS-Remote#83.

DownloadStorageTest.savesNothingOutsideTheDownloadLocation covers it.


Generated by Claude Code

A playlist, artist, album or file name of only dots, such as "..",
named the folder above, so a song from a Clementine with such names
was saved outside Clementine Remote's folder on Android 9 and earlier,
where downloads are files. Such names are now left out, as empty ones
are, and a file name left empty falls back to the song's title, as in
the iOS client.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R2bAq6kZW6eyymkA3zsd4p
@hatstand
hatstand merged commit 460906d into master Nov 9, 2026
7 checks passed
@hatstand
hatstand deleted the claude/project-thread-wugi27-download-dot-names branch November 9, 2026 02:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants