aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
authorJonas Maier <>2026-03-07 12:19:40 +0100
committerJonas Maier <>2026-03-07 12:19:40 +0100
commitf87cb13a99fa041c3065a74ea1eab4c0a963cd7d (patch)
treef92374f5ef08bc5e4c0d0029145bbc905a8f7d2c /src/main.rs
parent54a02770856320cf6dea1e68efe42e2691fe5b7b (diff)
downloadpish-f87cb13a99fa041c3065a74ea1eab4c0a963cd7d.tar.gz
correct display of path if in root
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index 9fc903f..efcbd3c 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -94,7 +94,7 @@ impl Session {
} else {
dir.to_string_lossy().to_string()
};
- while s.ends_with("/") {
+ while s.ends_with("/") && s.len() > 1 {
s.remove(s.len() - 1);
}
Ok(s)