Merge pull request #171 from rzlourenco/master
Fix a bug where files without an extension were not copied
This commit is contained in:
commit
b91f817bfd
|
@ -147,15 +147,15 @@ pub fn copy_files_except_ext(from: &Path, to: &Path, recursive: bool, ext_blackl
|
||||||
if ext_blacklist.contains(&ext.to_str().unwrap()) {
|
if ext_blacklist.contains(&ext.to_str().unwrap()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
debug!("[*] creating path for file: {:?}",
|
|
||||||
&to.join(entry.path().file_name().expect("a file should have a file name...")));
|
|
||||||
|
|
||||||
info!("[*] Copying file: {:?}\n to {:?}",
|
|
||||||
entry.path(),
|
|
||||||
&to.join(entry.path().file_name().expect("a file should have a file name...")));
|
|
||||||
try!(fs::copy(entry.path(),
|
|
||||||
&to.join(entry.path().file_name().expect("a file should have a file name..."))));
|
|
||||||
}
|
}
|
||||||
|
debug!("[*] creating path for file: {:?}",
|
||||||
|
&to.join(entry.path().file_name().expect("a file should have a file name...")));
|
||||||
|
|
||||||
|
info!("[*] Copying file: {:?}\n to {:?}",
|
||||||
|
entry.path(),
|
||||||
|
&to.join(entry.path().file_name().expect("a file should have a file name...")));
|
||||||
|
try!(fs::copy(entry.path(),
|
||||||
|
&to.join(entry.path().file_name().expect("a file should have a file name..."))));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|
Loading…
Reference in New Issue