mirror of
https://github.com/rust-lang/mdBook
synced 2024-12-14 06:42:35 +00:00
Fixed the error in copy_files_except_ext #55
This commit is contained in:
parent
103048c0d1
commit
0a50d6b33f
1 changed files with 6 additions and 1 deletions
|
@ -150,7 +150,12 @@ pub fn copy_files_except_ext(from: &Path, to: &Path, recursive: bool, ext_blackl
|
|||
if metadata.is_dir() && recursive {
|
||||
if entry.path() == to.to_path_buf() { continue }
|
||||
debug!("[*] is dir");
|
||||
try!(fs::create_dir(&to.join(entry.file_name())));
|
||||
|
||||
// check if output dir already exists
|
||||
if !to.join(entry.file_name()).exists() {
|
||||
try!(fs::create_dir(&to.join(entry.file_name())));
|
||||
}
|
||||
|
||||
try!(copy_files_except_ext(
|
||||
&from.join(entry.file_name()),
|
||||
&to.join(entry.file_name()),
|
||||
|
|
Loading…
Reference in a new issue