From 10817626578b31725e19ef3fcdb9f5f3d1e97336 Mon Sep 17 00:00:00 2001 From: Benjamin Sago Date: Sat, 19 Aug 2017 13:53:33 +0100 Subject: [PATCH] Basically, log before doing fs operations --- src/fs/file.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/fs/file.rs b/src/fs/file.rs index 0daa32e..40d1f04 100644 --- a/src/fs/file.rs +++ b/src/fs/file.rs @@ -62,9 +62,11 @@ impl<'dir> File<'dir> { FN: Into> { let parent_dir = parent_dir.into(); - let metadata = fs::symlink_metadata(&path)?; let name = filename.into().unwrap_or_else(|| File::filename(&path)); let ext = File::ext(&path); + + debug!("Statting file {:?}", &path); + let metadata = fs::symlink_metadata(&path)?; Ok(File { path, parent_dir, metadata, ext, name }) } @@ -191,6 +193,7 @@ impl<'dir> File<'dir> { // this file -- which could be absolute or relative -- to the path // we actually look up and turn into a `File` -- which needs to be // absolute to be accessible from any directory. + debug!("Reading link {:?}", &self.path); let path = match fs::read_link(&self.path) { Ok(p) => p, Err(e) => return FileTarget::Err(e),