From 6c718f3ed9ff78ec7d1d5fc7ac760bfa83e3ed02 Mon Sep 17 00:00:00 2001 From: Antonio SJ Musumeci Date: Thu, 14 Mar 2024 07:57:52 -0500 Subject: [PATCH] fuse_getattr.cpp --- src/fuse_getattr.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/fuse_getattr.cpp b/src/fuse_getattr.cpp index 403e5a0e..4eb856e7 100644 --- a/src/fuse_getattr.cpp +++ b/src/fuse_getattr.cpp @@ -139,13 +139,17 @@ namespace l int rv; std::string fullpath; StrVec basepaths; + const char *basepath; static PolicyCache cache(1024*1024); - basepath = cache.find(fusepath_); - while(true) + if(basepath == NULL) { - + rv = searchFunc_(branches_,fusepath_,&basepaths); + if(rv == -1) + return -errno; + + basepath = cache.insert(fusepath_,basepaths[0]); }