tagfile wchar fix.

This commit is contained in:
2026-06-09 08:41:33 +02:00
parent 6ed566c6cd
commit 091664044c
+9 -14
View File
@@ -137,20 +137,15 @@
(make-tags-picture mimetype kind bm #:description description)) (make-tags-picture mimetype kind bm #:description description))
(define (open-tag-file file) (define (open-tag-file file)
(let ((tag-file (taglib_file_new file))) (if (eq? (system-type 'os) 'windows)
(if (and tag-file (taglib_file_is_valid tag-file)) (let ((tag-file (taglib_file_new_wchar file)))
tag-file (if (and tag-file (taglib_file_is_valid tag-file))
(begin tag-file
(when (and tag-file (not (eq? tag-file #f))) (taglib_file_free tag-file)) #f))
(if (eq? (system-type 'os) 'windows) (let ((tag-file (taglib_file_new file)))
(begin (if (and tag-file (taglib_file_is_valid tag-file))
(dbg-sound "Could not open file ~a, trying wchar version on windows" file) tag-file
(let ((wtag-file (taglib_file_new_wchar file))) #f))))
(if (and wtag-file (taglib_file_is_valid wtag-file)) wtag-file
(begin
(when (and wtag-file (not (eq? wtag-file #f))) (taglib_file_free wtag-file))
#f))))
#f)))))
(define (read-property-map tag-file) (define (read-property-map tag-file)
(define key-store (make-hash)) (define key-store (make-hash))