[all-commits] [llvm/llvm-project] 4a39d0: [libc++] Fix filesystem::remove_all() on FreeBSD (...
Mark Johnston via All-commits
all-commits at lists.llvm.org
Mon Jan 29 00:20:09 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 4a39d08908942b2d415db405844cbe4af73e75d4
https://github.com/llvm/llvm-project/commit/4a39d08908942b2d415db405844cbe4af73e75d4
Author: Mark Johnston <markjdb at gmail.com>
Date: 2024-01-29 (Mon, 29 Jan 2024)
Changed paths:
M libcxx/src/filesystem/operations.cpp
M libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.remove_all/remove_all.pass.cpp
Log Message:
-----------
[libc++] Fix filesystem::remove_all() on FreeBSD (#79540)
remove_all_impl() opens the target path with O_NOFOLLOW, which fails if
the target is a symbolic link. On FreeBSD, rather than returning ELOOP,
openat() returns EMLINK. This is unlikely to change for compatibility
reasons, see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=214633 .
Thus, check for EMLINK as well.
More information about the All-commits
mailing list