Skip to content
Snippets Groups Projects
Commit 1f93e8eb authored by Geoffray Adde's avatar Geoffray Adde
Browse files

FUSE: avoid the async open to truncate twice when openning for truncate.

parent d31d132d
No related branches found
No related tags found
No related merge requests found
......@@ -561,7 +561,7 @@ int LayoutWrapper::Open(const std::string& path, XrdSfsFileOpenMode flags,
mOpenHandler = new eos::fst::AsyncLayoutOpenHandler(plain_layout);
mFile->Redirect(path.c_str());
if (plain_layout->OpenAsync(flags, mode, mOpenHandler, opaque)) {
if (plain_layout->OpenAsync(flags & ~(SFS_O_TRUNC | SFS_O_CREAT), mode, mOpenHandler, opaque)) {
delete mOpenHandler;
mOpenHandler = NULL;
eos_static_err("error while async opening path=%s - fall back top sync open",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment