about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorDylan DPC <99973273+Dylan-DPC@users.noreply.github.com>2022-03-05 04:46:37 +0100
committerGitHub <noreply@github.com>2022-03-05 04:46:37 +0100
commit3e1e9b486605da4fe25329acfd14042b0d6819f6 (patch)
treebb10ce468b57c53e8122d54a7276aa5cad321bfc /compiler/rustc_codegen_llvm/src
parent69f11fff33f68701d222639a1a5ae991605ec3ab (diff)
parent735f60c34fc0b13d3aeb3873dcadff03dc141b07 (diff)
downloadrust-3e1e9b486605da4fe25329acfd14042b0d6819f6.tar.gz
rust-3e1e9b486605da4fe25329acfd14042b0d6819f6.zip
Rollup merge of #94446 - rusticstuff:remove_dir_all-illumos-fix, r=cuviper
UNIX `remove_dir_all()`: Try recursing first on the slow path

This only affects the _slow_ code path - if there is no `dirent.d_type` or if it is `DT_UNKNOWN`.

POSIX specifies that calling `unlink()` or `unlinkat(..., 0)` on a directory is allowed to succeed:
> The _path_ argument shall not name a directory unless the process has appropriate privileges and the implementation supports using _unlink()_ on directories.

This however can cause dangling inodes requiring an fsck e.g. on Illumos UFS, so we have to avoid that in the common case. We now just try to recurse into it first and unlink() if we can't open it as a directory.

The other two commits integrate the Macos x86-64 implementation reducing redundancy. Split into two commits for better reviewing.

Fixes #94335.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions