Revert removal of readdir init setup, simplify cfg usage (#1520)
Some checks failed
CodeQL / Analyze (push) Has been cancelled
mkdocs / deploy (push) Has been cancelled

This commit is contained in:
trapexit 2025-09-06 12:03:51 -04:00 • committed by GitHub
parent 99c28ad3bc
commit f64ff9ca1e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
42 changed files with 388 additions and 426 deletions

View file

@ -14,30 +14,27 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "fuse_opendir.hpp"
#include "config.hpp"
#include "dirinfo.hpp"
#include "fuse.h"
namespace FUSE
int
FUSE::opendir(const char *fusepath_,
fuse_file_info_t *ffi_)
{
int
opendir(const char *fusepath_,
fuse_file_info_t *ffi_)
{
Config::Read cfg;
ffi_->fh = reinterpret_cast<uint64_t>(new DirInfo(fusepath_));
ffi_->fh = reinterpret_cast<uint64_t>(new DirInfo(fusepath_));
ffi_->noflush = true;
ffi_->noflush = true;
if(cfg.cache_readdir)
{
ffi_->keep_cache = true;
ffi_->cache_readdir = true;
}
if(cfg->cache_readdir)
{
ffi_->keep_cache = true;
ffi_->cache_readdir = true;
}
return 0;
}
return 0;
}