From fc38e51a03426f163dac3baf0a5b0a36b3506ac8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn-Michael=20Miehe?= <40151420+ldericher@users.noreply.github.com> Date: Mon, 2 Jun 2025 13:32:34 +0000 Subject: [PATCH] mod File: absolute -> canonicalize --- src/sharry/file/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sharry/file/mod.rs b/src/sharry/file/mod.rs index 434b987..e948103 100644 --- a/src/sharry/file/mod.rs +++ b/src/sharry/file/mod.rs @@ -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) -> io::Result { - let abs_path = absolute(path)?; + let abs_path = canonicalize(path)?; let m = metadata(&abs_path)?; if !m.is_file() {