fuse_getattr.cpp

This commit is contained in:
Antonio SJ Musumeci 2024-02-13 20:02:52 -06:00
parent 819c341ec7
commit 83eb2d1740

View file

@ -108,10 +108,14 @@ namespace l
thread_local static std::unordered_map<std::string,std::string> 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_);