From f7bd28197d972ee266bb39f0f28cdd4bd6768a31 Mon Sep 17 00:00:00 2001 From: Antonio SJ Musumeci Date: Thu, 11 Apr 2024 21:47:15 -0500 Subject: [PATCH] fuse_open.cpp --- src/fuse_open.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/fuse_open.cpp b/src/fuse_open.cpp index cde1f77b..3dfd1b8f 100644 --- a/src/fuse_open.cpp +++ b/src/fuse_open.cpp @@ -232,15 +232,19 @@ namespace l fi = reinterpret_cast(ffi_->fh); + backing_id = 0; foo.visit(fi->fusepath, [&](const std::pair &e_) { backing_id = e_.second; }); - - backing_id = fuse_passthrough_open(fc_,fi->fd); - if(backing_id <= 0) - return 0; + if(backing_id == 0) + { + backing_id = fuse_passthrough_open(fc_,fi->fd); + if(backing_id <= 0) + return 0; + foo.insert(fi->fusepath,backing_id); + } ffi_->passthrough = true; ffi_->keep_cache = true;