diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-02-24 16:44:56 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-02-24 16:46:32 +0800 |
| commit | 2cef51d7448206291b1ac92fdaf708a7e30c78a4 (patch) | |
| tree | 6d9475e4ed006976ed5beb1ef7e347776e6aa6e4 /src | |
| parent | eac47247875fe79960a1dfd714a8bb2f9a148e7d (diff) | |
Fix detection of trailing backslash in path formattingnext
Diffstat (limited to 'src')
| -rw-r--r-- | src/fmt_path.rs | 2 |
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")] |
