Skip to content

Commit

Permalink
Fix bug: scan_suffixes panicked if given path only has one component
Browse files Browse the repository at this point in the history
  • Loading branch information
Ploppz committed Jan 31, 2022
1 parent f82cd14 commit 340c4e5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/suffix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ pub trait SuffixScheme {
.file_name()
.expect("basepath.file_name()")
.to_string_lossy();
let basepath = basepath.canonicalize().unwrap();
let parent = basepath.parent().unwrap();
let filenames = std::fs::read_dir(parent)
.unwrap()
Expand Down

0 comments on commit 340c4e5

Please sign in to comment.