Skip to content

Commit

Permalink
🐞 fix: Fix error when non-ascii characters are in the file path for L…
Browse files Browse the repository at this point in the history
…inux
  • Loading branch information
caoccao committed Jan 14, 2025
1 parent 1f986b2 commit 57a55b3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src-tauri/src/media_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ extern "C" {

fn to_wchars(s: &str) -> Vec<mi_wchar> {
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)
Expand Down

0 comments on commit 57a55b3

Please sign in to comment.