diff options
| author | bors <bors@rust-lang.org> | 2019-06-10 02:35:29 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-06-10 02:35:29 +0000 |
| commit | ad3829fd66e1f0804fc51775e5d58d89f0de825c (patch) | |
| tree | db8771466579e490ba20de5b725648d84f67fdc2 /src/bootstrap | |
| parent | 61a60ce7d369b54e209003e9e92bf90d6f5e5d4b (diff) | |
| parent | 449db68910570dea654304d4e6cf48b1e75d5043 (diff) | |
| download | rust-ad3829fd66e1f0804fc51775e5d58d89f0de825c.tar.gz rust-ad3829fd66e1f0804fc51775e5d58d89f0de825c.zip | |
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.
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/lib.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs index ca4489655ca..b9d287abb0c 100644 --- a/src/bootstrap/lib.rs +++ b/src/bootstrap/lib.rs @@ -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); |
