From 091664044c56a467a5a07b1ed629c5b1968a3c8c Mon Sep 17 00:00:00 2001 From: Hans Dijkema Date: Tue, 9 Jun 2026 08:41:33 +0200 Subject: [PATCH] tagfile wchar fix. --- taglib.rkt | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/taglib.rkt b/taglib.rkt index 7516125..c917021 100644 --- a/taglib.rkt +++ b/taglib.rkt @@ -137,20 +137,15 @@ (make-tags-picture mimetype kind bm #:description description)) (define (open-tag-file file) - (let ((tag-file (taglib_file_new file))) - (if (and tag-file (taglib_file_is_valid tag-file)) - tag-file - (begin - (when (and tag-file (not (eq? tag-file #f))) (taglib_file_free tag-file)) - (if (eq? (system-type 'os) 'windows) - (begin - (dbg-sound "Could not open file ~a, trying wchar version on windows" file) - (let ((wtag-file (taglib_file_new_wchar file))) - (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))))) + (if (eq? (system-type 'os) 'windows) + (let ((tag-file (taglib_file_new_wchar file))) + (if (and tag-file (taglib_file_is_valid tag-file)) + tag-file + #f)) + (let ((tag-file (taglib_file_new file))) + (if (and tag-file (taglib_file_is_valid tag-file)) + tag-file + #f)))) (define (read-property-map tag-file) (define key-store (make-hash))