mirror of
https://github.com/navidrome/navidrome.git
synced 2026-10-13 21:07:10 +02:00
Converting every '\' to '/' broke escaped literals such as '\[Mix\]',
which matched a real "[Mix]" folder before. On Windows, '\' is now a
path separator except for an escaped pair ('\[...\]', '\{...\}') or a
lone '\]' / '\}', so 'Playlists\navidrome', 'Playlists\{rock,jazz}',
'Playlists\[ab]' and '\[Mix\]' all work. Other OSes keep the pattern
as is. A separator right before an escaped pair must be written as '/'
or '\\' ('Playlists/\[Mix\]').
InPath now matches the folder's slash-separated library path
(path.Join(Path, Name)) instead of a filepath.Rel/ToSlash round trip,
and gets its patterns from conf.PlaylistsPathPatterns, which the
config validation can share.
Tests cover the conversion, InPath with scanner-built folders, and
scans of real folders (nested paths, brackets, braces, controls).
|
||
|---|---|---|
| .. | ||
| buildtags | ||
| configtest | ||
| mime | ||
| testdata | ||
| configuration.go | ||
| configuration_test.go | ||
| dir.go | ||
| dir_test.go | ||
| export_test.go | ||