diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-06-14 18:18:18 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-06-14 18:18:28 +0200 |
| commit | 0dacb2d151e1790613b324b3051b8ce7aa26a90e (patch) | |
| tree | 3e06eddd4c4b7f32b4a75ccfade0629d13a1572e /src/loading/fs.rs | |
| parent | 20b990d2973f68674e65391ae0f2a115ed1640a9 (diff) | |
Fix error messages on Windows
Diffstat (limited to 'src/loading/fs.rs')
| -rw-r--r-- | src/loading/fs.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/loading/fs.rs b/src/loading/fs.rs index 23b67e34..c1576e86 100644 --- a/src/loading/fs.rs +++ b/src/loading/fs.rs @@ -121,10 +121,9 @@ impl Loader for FsLoader { } fn resolve(&self, path: &Path) -> io::Result<FileHash> { - let file = File::open(path)?; - let meta = file.metadata()?; + let meta = fs::metadata(path)?; if meta.is_file() { - let handle = Handle::from_file(file)?; + let handle = Handle::from_path(path)?; Ok(FileHash(fxhash::hash64(&handle))) } else { Err(io::ErrorKind::NotFound.into()) |
