summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-02-24 16:44:56 +0800
committer魏曹先生 <1992414357@qq.com>2026-02-24 16:44:56 +0800
commit368e7c0b10f8ea54a7af3b77c8bda1587d481047 (patch)
treea9041efc984a3600a4c651b20e64685ccc0bf080 /src
parenteac47247875fe79960a1dfd714a8bb2f9a148e7d (diff)
Fix detection of trailing backslash in path formatting0.1.2
Diffstat (limited to 'src')
-rw-r--r--src/fmt_path.rs2
1 files changed, 1 insertions, 1 deletions
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<String, PathFormatError> {
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")]