mod File: absolute -> canonicalize
This commit is contained in:
parent
256f3ce8ba
commit
fc38e51a03
1 changed files with 3 additions and 3 deletions
|
|
@ -2,10 +2,10 @@ mod chunks;
|
|||
|
||||
use std::{
|
||||
ffi::OsStr,
|
||||
fs::metadata,
|
||||
fs::{canonicalize, metadata},
|
||||
hash::{Hash, Hasher},
|
||||
io::{self, ErrorKind},
|
||||
path::{Path, PathBuf, absolute},
|
||||
path::{Path, PathBuf},
|
||||
};
|
||||
|
||||
use log::{debug, error};
|
||||
|
|
@ -33,7 +33,7 @@ impl Hash for File {
|
|||
|
||||
impl File {
|
||||
pub fn new(path: impl AsRef<Path>) -> io::Result<Self> {
|
||||
let abs_path = absolute(path)?;
|
||||
let abs_path = canonicalize(path)?;
|
||||
|
||||
let m = metadata(&abs_path)?;
|
||||
if !m.is_file() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue