From 2cef51d7448206291b1ac92fdaf708a7e30c78a4 Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Tue, 24 Feb 2026 16:44:56 +0800 Subject: Fix detection of trailing backslash in path formatting --- src/fmt_path.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/fmt_path.rs b/src/fmt_path.rs index e2c06a4..90a8d64 100644 --- a/src/fmt_path.rs +++ b/src/fmt_path.rs @@ -94,7 +94,7 @@ pub fn fmt_path_str_custom( config: &PathFormatConfig, ) -> Result { let path_result = path.into(); - let ends_with_slash = path_result.ends_with('/'); + let ends_with_slash = path_result.ends_with('/') || path_result.ends_with('\\'); // ANSI Strip #[cfg(feature = "strip-ansi")] -- cgit