Skip to content

Commit 45a4810

Browse files
authored
Merge pull request #1399 from u7693/issue-1396
Show path in the error message (#1396)
2 parents 3ab911a + 6bcabcb commit 45a4810

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/utils/fs.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,10 @@ pub fn copy_files_except_ext(
110110

111111
for entry in fs::read_dir(from)? {
112112
let entry = entry?;
113-
let metadata = entry.path().metadata()?;
113+
let metadata = entry
114+
.path()
115+
.metadata()
116+
.with_context(|| format!("Failed to read {:?}", entry.path()))?;
114117

115118
// If the entry is a dir and the recursive option is enabled, call itself
116119
if metadata.is_dir() && recursive {

0 commit comments

Comments
 (0)