Auto merge of #61706 - petrhosek:bootstrap-cp-r, r=Mark-Simulacrum
Use Build::read_dir instead of fs::read_dir in Build::cp_r Build::read_dir does better error handling when the directory doesn't exist; it actually prints the name of the directory rather than just printing the underlying error "No such file or directory" which on its own isn't very useful.
This commit is contained in:
commit
ad3829fd66
1 changed files with 1 additions and 2 deletions
|
|
@ -1214,8 +1214,7 @@ impl Build {
|
|||
/// when this function is called.
|
||||
pub fn cp_r(&self, src: &Path, dst: &Path) {
|
||||
if self.config.dry_run { return; }
|
||||
for f in t!(fs::read_dir(src)) {
|
||||
let f = t!(f);
|
||||
for f in self.read_dir(src) {
|
||||
let path = f.path();
|
||||
let name = path.file_name().unwrap();
|
||||
let dst = dst.join(name);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue