Repository navigation
Never save a downloaded song outside the download location - #409
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Song downloads build their folders from the playlist, artist and album names Clementine sends, and the file name from the song's filename.
Utilities.removeInvalidFileCharacterstakes 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, whereFileDownloadStoragewrites 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.parttrims dots and replaces separators.The same change for iOS is iOS-Remote#83.
DownloadStorageTest.savesNothingOutsideTheDownloadLocationcovers it.Generated by Claude Code