diff options
| author | bors <bors@rust-lang.org> | 2022-07-30 21:01:42 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-07-30 21:01:42 +0000 |
| commit | 0f4bcadb46006bc484dad85616b484f93879ca4e (patch) | |
| tree | 24c9bc84721b216023f64394714d5ec09f24c3da /library/std/src | |
| parent | 038f9e6bef9c8fcf122d93a8a33ac546f5606eb3 (diff) | |
| parent | f21a06f8fa6c5e0bc58c7b48817f532af62a0bc3 (diff) | |
| download | rust-0f4bcadb46006bc484dad85616b484f93879ca4e.tar.gz rust-0f4bcadb46006bc484dad85616b484f93879ca4e.zip | |
Auto merge of #99964 - matthiaskrgr:rollup-jr836e2, r=matthiaskrgr
Rollup of 8 pull requests Successful merges: - #99650 (Support `x --keep-stage 0 check`) - #99873 (rustdoc: align invalid-html-tags lint with commonmark spec) - #99889 (Remove `parent_pat` from `TopInfo`) - #99890 (Do not allow bad projection term to leak into the type checker) - #99937 (Reset directory iteration in remove_dir_all) - #99950 (Remove more Clean trait implementations) - #99956 (Also gate AllocatedPointer and AllocAlign definitions by LLVM_VERSION_GE) - #99962 (Discover channel for LLVM download) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'library/std/src')
| -rw-r--r-- | library/std/src/sys/windows/fs.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/library/std/src/sys/windows/fs.rs b/library/std/src/sys/windows/fs.rs index 4d3162f1254..c96bcf41d51 100644 --- a/library/std/src/sys/windows/fs.rs +++ b/library/std/src/sys/windows/fs.rs @@ -1035,11 +1035,13 @@ fn remove_dir_all_iterative(f: &File, delete: fn(&File) -> io::Result<()>) -> io unsafe { mem::ManuallyDrop::new(File::from_raw_handle(f.as_raw_handle())) } } + let mut restart = true; while let Some(dir) = dirlist.last() { let dir = copy_handle(dir); // Fill the buffer and iterate the entries. - let more_data = dir.fill_dir_buff(&mut buffer, false)?; + let more_data = dir.fill_dir_buff(&mut buffer, restart)?; + restart = false; for (name, is_directory) in buffer.iter() { if is_directory { let child_dir = open_link_no_reparse( |
