Skip to content

std::fs::remove_dir_all fails if any of the intermediate file deletions fails with ENOENT #127576

Closed

Description

cvt(unsafe { unlinkat(fd, child_name.as_ptr(), 0) })?;

// unlink the directory after removing its contents
cvt(unsafe {
unlinkat(parent_fd.unwrap_or(libc::AT_FDCWD), path.as_ptr(), libc::AT_REMOVEDIR)
})?;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

A-filesystemArea: `std::fs`C-bugCategory: This is a bug.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.O-unixOperating system: Unix-likeT-libsRelevant to the library team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions