summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Huss <eric@huss.org>2020-12-14 08:08:05 -0800
committerGitHub <noreply@github.com>2020-12-14 08:08:05 -0800
commit45a481049ee51beb2fcadde740f850aedf771e0a (patch)
tree89d8bddd1afa805318d3b4875cac10aac78cfc25
parent3ab911afa189ea2979f1a6002596b6ccf4399ea1 (diff)
parent6bcabcbb6b50e2e523982b626d3003e95ffedb73 (diff)
Merge pull request #1399 from u7693/issue-1396
Show path in the error message (#1396)
-rw-r--r--src/utils/fs.rs5
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 {