mirror of
https://github.com/facebook/sapling.git
synced 2024-10-05 06:18:07 +03:00
eden: no O_PATH on macos, adjust Overlay code
Summary: Thankfully, we can simply remove it; it is really just a performance optimization that we can enable for linux. Reviewed By: simpkins Differential Revision: D13475719 fbshipit-source-id: 09b60dcf995c2c5390b91aa316c62ca1b4d3f944
This commit is contained in:
parent
9fca886c54
commit
5b08e0c73b
@ -144,8 +144,13 @@ void Overlay::initOverlay() {
|
||||
}
|
||||
|
||||
// Open a handle on the overlay directory itself
|
||||
int dirFd =
|
||||
open(localDir_.c_str(), O_RDONLY | O_PATH | O_DIRECTORY | O_CLOEXEC);
|
||||
int dirFd = open(
|
||||
localDir_.c_str(),
|
||||
O_RDONLY |
|
||||
#ifdef O_PATH
|
||||
O_PATH |
|
||||
#endif
|
||||
O_DIRECTORY | O_CLOEXEC);
|
||||
folly::checkUnixError(
|
||||
dirFd, "error opening overlay directory handle for ", localDir_.value());
|
||||
dirFile_ = File{dirFd, /* ownsFd */ true};
|
||||
|
Loading…
Reference in New Issue
Block a user