Merge pull request #1446 from BusyJay/fix-file-lines-check
fix path check
This commit is contained in:
commit
b4833a8c58
@ -367,7 +367,16 @@ fn determine_operation(matches: &Matches) -> FmtResult<Operation> {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
let files: Vec<_> = matches.free.iter().map(PathBuf::from).collect();
|
let files: Vec<_> = matches
|
||||||
|
.free
|
||||||
|
.iter()
|
||||||
|
.map(|s| {
|
||||||
|
let p = PathBuf::from(s);
|
||||||
|
// we will do comparison later, so here tries to canonicalize first
|
||||||
|
// to get the expected behavior.
|
||||||
|
p.canonicalize().unwrap_or(p)
|
||||||
|
})
|
||||||
|
.collect();
|
||||||
|
|
||||||
Ok(Operation::Format {
|
Ok(Operation::Format {
|
||||||
files: files,
|
files: files,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user