Correctly strip prefix from paths

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
Harsh Shandilya 2020-10-30 12:46:16 +05:30
parent 767da20d35
commit 3d6bb33b74
No known key found for this signature in database
GPG key ID: 366D7BBAD1031E80

View file

@ -89,8 +89,8 @@ fn freeze_repos(dir: &str) -> anyhow::Result<()> {
) { ) {
let path = entry let path = entry
.path() .path()
.to_string_lossy() .strip_prefix(Path::new(dir))?
.strip_prefix(&dir) .to_str()
.unwrap() .unwrap()
.to_string(); .to_string();
repos.insert( repos.insert(