Skip to content

Commit 647af54

Browse files
committed
fix: 🐞 ensure canonical path resolution in Source conversion from string
Signed-off-by: Onuralp SEZER <thunderbirdtr@gmail.com>
1 parent fbb5d2c commit 647af54

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/source.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ impl From<&str> for Source {
137137
return Self::Glob(s.to_string());
138138
}
139139

140-
let path = PathBuf::from(s);
140+
let path = PathBuf::from(s).canonicalize().unwrap_or_else(|_| PathBuf::from(s));
141141

142142
// Check if it's a directory
143143
if path.is_dir() {

0 commit comments

Comments
 (0)