Fix SBCL bracket-escaping in shuffle library scanner
stream-harmony.lisp: - scan-music-library-files: use native-namestring instead of namestring when collecting file paths, producing real OS paths without SBCL's backslash escaping of brackets (e.g. [FLAC] not \[FLAC]) - Use parse-native-namestring for root directory entry point so dirs with brackets are not treated as wildcard patterns cl-streamer submodule updated to d57a268: - play-file, read-audio-metadata, play-list retry: same native-namestring fix to prevent double-escaping through parse-native-namestring Fixes FLAC FILE slot unbound errors and SIGSEGV memory fault that crashed the shuffle pipeline after consecutive failures on bracket paths.
This commit is contained in:
parent
04a874ceb5
commit
2a713d7386
|
|
@ -1 +1 @@
|
|||
Subproject commit c0f9c0e161e2076f7dde8fdcbcb0f701d02cc35b
|
||||
Subproject commit d57a2683e757577a7292b63b5d3ad7016bb24187
|
||||
|
|
@ -307,7 +307,8 @@
|
|||
|
||||
(defun scan-music-library-files (&optional (directory *music-library-path*))
|
||||
"Recursively scan DIRECTORY for supported audio files.
|
||||
Returns a list of namestrings."
|
||||
Returns a list of native namestrings (real OS paths without SBCL's
|
||||
bracket escaping, safe to pass through parse-native-namestring later)."
|
||||
(let ((files nil)
|
||||
(extensions *supported-formats*))
|
||||
(labels ((scan (dir)
|
||||
|
|
@ -315,7 +316,7 @@
|
|||
(dolist (entry (uiop:directory-files dir))
|
||||
(let ((ext (pathname-type entry)))
|
||||
(when (and ext (member ext extensions :test #'string-equal))
|
||||
(push (namestring entry) files))))
|
||||
(push (sb-ext:native-namestring entry) files))))
|
||||
(error (e)
|
||||
(log:debug "Error scanning ~A: ~A" dir e)))
|
||||
(handler-case
|
||||
|
|
@ -323,7 +324,14 @@
|
|||
(scan sub))
|
||||
(error (e)
|
||||
(log:debug "Error listing subdirs of ~A: ~A" dir e)))))
|
||||
(scan (pathname directory)))
|
||||
;; Use parse-native-namestring so directories with brackets (e.g.
|
||||
;; "[FLAC]") are not treated as wildcard patterns by SBCL.
|
||||
(scan (sb-ext:parse-native-namestring
|
||||
(etypecase directory
|
||||
(string directory)
|
||||
(pathname (sb-ext:native-namestring directory)))
|
||||
nil *default-pathname-defaults*
|
||||
:as-directory t)))
|
||||
(nreverse files)))
|
||||
|
||||
(defvar *shuffle-library-cache* nil
|
||||
|
|
|
|||
Loading…
Reference in New Issue