From 57a55b3198fd0a9a32c32bc1fb6e1cfaa812b2e1 Mon Sep 17 00:00:00 2001 From: Sam Cao Date: Wed, 15 Jan 2025 07:26:59 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix:=20Fix=20error=20when=20non-?= =?UTF-8?q?ascii=20characters=20are=20in=20the=20file=20path=20for=20Linux?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src-tauri/src/media_info.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src-tauri/src/media_info.rs b/src-tauri/src/media_info.rs index 3103ab1..2d0fde8 100644 --- a/src-tauri/src/media_info.rs +++ b/src-tauri/src/media_info.rs @@ -62,11 +62,11 @@ extern "C" { fn to_wchars(s: &str) -> Vec { let wchars = WideCString::from_str_truncate(s).into_vec(); - #[cfg(target_os = "windows")] + #[cfg(not(target_os = "macos"))] { wchars } - #[cfg(not(target_os = "windows"))] + #[cfg(target_os = "macos")] if wchars.len() > 0 && wchars.iter().any(|&c| c >= 0x100) { encoding::all::UTF_8 .encode(s, encoding::EncoderTrap::Strict)