diff --git a/src/fuse_getattr.cpp b/src/fuse_getattr.cpp index bf9133f4..64fc7b24 100644 --- a/src/fuse_getattr.cpp +++ b/src/fuse_getattr.cpp @@ -108,10 +108,14 @@ namespace l thread_local static std::unordered_map cache; auto i = cache.find(fusepath_); - - rv = searchFunc_(branches_,fusepath_,&basepaths); - if(rv == -1) - return -errno; + if(i == cache.end()) + { + rv = searchFunc_(branches_,fusepath_,&basepaths); + if(rv == -1) + return -errno; + + cache.insert({fusepath_,basepaths[0]}); + } fullpath = fs::path::make(basepaths[0],fusepath_);