diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-08-23 06:26:51 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-23 06:26:51 +0200 |
| commit | 370b3265ffb64e29ba3e960fa33f8fef80c11875 (patch) | |
| tree | a834bf9e4078704e87ae6663aefcc2afb0be5b78 /library/std/src/sys/pal/windows | |
| parent | b5723af3457b9cd3795eeb97e9af2d34964854f2 (diff) | |
| parent | 736f773844e7ebf05ccb827c17b7ad9eb28aa295 (diff) | |
| download | rust-370b3265ffb64e29ba3e960fa33f8fef80c11875.tar.gz rust-370b3265ffb64e29ba3e960fa33f8fef80c11875.zip | |
Rollup merge of #127623 - lolbinarycat:fix_remove_dir_all, r=Amanieu
fix: fs::remove_dir_all: treat internal ENOENT as success fixes #127576 try-job: test-various
Diffstat (limited to 'library/std/src/sys/pal/windows')
| -rw-r--r-- | library/std/src/sys/pal/windows/fs.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/std/src/sys/pal/windows/fs.rs b/library/std/src/sys/pal/windows/fs.rs index d99d4931de4..2134152ea93 100644 --- a/library/std/src/sys/pal/windows/fs.rs +++ b/library/std/src/sys/pal/windows/fs.rs @@ -14,7 +14,7 @@ use crate::sys::handle::Handle; use crate::sys::path::maybe_verbatim; use crate::sys::time::SystemTime; use crate::sys::{c, cvt, Align8}; -use crate::sys_common::{AsInner, FromInner, IntoInner}; +use crate::sys_common::{ignore_notfound, AsInner, FromInner, IntoInner}; use crate::{fmt, ptr, slice, thread}; pub struct File { @@ -1160,7 +1160,7 @@ pub fn remove_dir_all(path: &Path) -> io::Result<()> { return Err(io::Error::from_raw_os_error(c::ERROR_DIRECTORY as _)); } - match remove_dir_all_iterative(&file, File::posix_delete) { + match ignore_notfound(remove_dir_all_iterative(&file, File::posix_delete)) { Err(e) => { if let Some(code) = e.raw_os_error() { match code as u32 { |
