From 67c761bf8a6e7bf5dd85cc6d69c021856cc4ccb7 Mon Sep 17 00:00:00 2001 From: Nguyen Duc Toan Date: Sat, 30 Sep 2023 13:51:06 +0700 Subject: [PATCH] fix linux build break --- app/src/manager/folder.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/manager/folder.rs b/app/src/manager/folder.rs index f0552bad..8f087ce2 100644 --- a/app/src/manager/folder.rs +++ b/app/src/manager/folder.rs @@ -74,7 +74,10 @@ impl<'a> Folder<'a> { #[cfg(target_os = "windows")] let (head, body, tail) = finder.explode(short.name.to_string_lossy().as_bytes())?; #[cfg(not(target_os = "windows"))] - let (head, body, tail) = finder.explode(short.name.as_bytes())?; + let (head, body, tail) = { + use std::os::unix::ffi::OsStrExt; + finder.explode(short.name.as_bytes())? + }; // TODO: to be configured by THEME? let style = Style::new().fg(Color::Rgb(255, 255, 50)).add_modifier(Modifier::ITALIC);