mirror of
https://github.com/rust-lang/mdBook
synced 2024-12-14 23:02:34 +00:00
Improve error message
This commit is contained in:
parent
3ab911afa1
commit
6bcabcbb6b
1 changed files with 4 additions and 1 deletions
|
@ -110,7 +110,10 @@ pub fn copy_files_except_ext(
|
||||||
|
|
||||||
for entry in fs::read_dir(from)? {
|
for entry in fs::read_dir(from)? {
|
||||||
let entry = entry?;
|
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 the entry is a dir and the recursive option is enabled, call itself
|
||||||
if metadata.is_dir() && recursive {
|
if metadata.is_dir() && recursive {
|
||||||
|
|
Loading…
Reference in a new issue