mirror of
https://github.com/Llewellynvdm/exa.git
synced 2024-11-26 22:06:26 +00:00
Basically, log before doing fs operations
This commit is contained in:
parent
014e179abf
commit
1081762657
@ -62,10 +62,12 @@ impl<'dir> File<'dir> {
|
|||||||
FN: Into<Option<String>>
|
FN: Into<Option<String>>
|
||||||
{
|
{
|
||||||
let parent_dir = parent_dir.into();
|
let parent_dir = parent_dir.into();
|
||||||
let metadata = fs::symlink_metadata(&path)?;
|
|
||||||
let name = filename.into().unwrap_or_else(|| File::filename(&path));
|
let name = filename.into().unwrap_or_else(|| File::filename(&path));
|
||||||
let ext = File::ext(&path);
|
let ext = File::ext(&path);
|
||||||
|
|
||||||
|
debug!("Statting file {:?}", &path);
|
||||||
|
let metadata = fs::symlink_metadata(&path)?;
|
||||||
|
|
||||||
Ok(File { path, parent_dir, metadata, ext, name })
|
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
|
// this file -- which could be absolute or relative -- to the path
|
||||||
// we actually look up and turn into a `File` -- which needs to be
|
// we actually look up and turn into a `File` -- which needs to be
|
||||||
// absolute to be accessible from any directory.
|
// absolute to be accessible from any directory.
|
||||||
|
debug!("Reading link {:?}", &self.path);
|
||||||
let path = match fs::read_link(&self.path) {
|
let path = match fs::read_link(&self.path) {
|
||||||
Ok(p) => p,
|
Ok(p) => p,
|
||||||
Err(e) => return FileTarget::Err(e),
|
Err(e) => return FileTarget::Err(e),
|
||||||
|
Loading…
Reference in New Issue
Block a user