From 3d6bb33b74854fc4297d54e6351ecd049ba171e5 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Fri, 30 Oct 2020 12:46:16 +0530 Subject: [PATCH] Correctly strip prefix from paths Signed-off-by: Harsh Shandilya --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 8403602..f843c71 100644 --- a/src/main.rs +++ b/src/main.rs @@ -89,8 +89,8 @@ fn freeze_repos(dir: &str) -> anyhow::Result<()> { ) { let path = entry .path() - .to_string_lossy() - .strip_prefix(&dir) + .strip_prefix(Path::new(dir))? + .to_str() .unwrap() .to_string(); repos.insert(