Repository navigation
Playlist: Don't stop scanning at file names that can't be converted - #1060
Open
Coastrnaut wants to merge 1 commit into
Open
Coastrnaut wants to merge 1 commit into
Coastrnaut wants to merge 1 commit into
Conversation
On Windows, path::string() converts to the active ANSI code page and throws if a file name contains characters outside of it (e.g. U+26A0 or Cyrillic letters on a Western European system). In recursive mode, the exception aborted the scan and silently dropped all files after it, in non-recursive mode it escaped AddPath() entirely. Such files are now skipped individually and the scan continues. Also fix AddPath() shifting the playback history indices twice when inserting at an index: AddItem() already does this for each added item. Fixes projectM-visualizer#962
This branch has not been deployed
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.
Fixes #962
Problem
On Windows,
path::string()converts to the active ANSI code page and throws if a file name contains characters outside of it (e.g.⚠or Cyrillic letters on a Western European system).AddPath()entirely.Change
AddPath()shifted the playback history indices a second time, althoughAddItem()already does this for each added item. A history entry that should move from 0 to 3 ended up at 6.std::filesystemand Boost.Filesystem. It doesn't useu8string().Tests
PlaylistTest.cpp, using a newdata/presets-unicodefolder that containsB_⚠_Warning.milk. All three fail on master and pass with this change. Playlist suite: 101/101.Playlistcode, every folder recursively and non-recursively. Both produced identical playlists: 27,078 items in the same order.Retested on current master (2026-11-12)
$$$ Royal - Mashup (257), which also renders differently between two runs of master.