diff options
author | Eric Huss <eric@huss.org> | 2020-12-14 08:08:05 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-14 08:08:05 -0800 |
commit | 45a481049ee51beb2fcadde740f850aedf771e0a (patch) | |
tree | 89d8bddd1afa805318d3b4875cac10aac78cfc25 | |
parent | 3ab911afa189ea2979f1a6002596b6ccf4399ea1 (diff) | |
parent | 6bcabcbb6b50e2e523982b626d3003e95ffedb73 (diff) |
Merge pull request #1399 from u7693/issue-1396
Show path in the error message (#1396)
-rw-r--r-- | src/utils/fs.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/utils/fs.rs b/src/utils/fs.rs index dd1ec218..1c80abbb 100644 --- a/src/utils/fs.rs +++ b/src/utils/fs.rs @@ -110,7 +110,10 @@ pub fn copy_files_except_ext( for entry in fs::read_dir(from)? { let entry = entry?; - let metadata = entry.path().metadata()?; + let metadata = entry + .path() + .metadata() + .with_context(|| format!("Failed to read {:?}", entry.path()))?; // If the entry is a dir and the recursive option is enabled, call itself if metadata.is_dir() && recursive { |