Start using std::filesystem::path for fusepath (#1522)
Some checks are pending
CodeQL / Analyze (push) Waiting to run
mkdocs / deploy (push) Waiting to run

This commit is contained in:
trapexit 2025-09-17 23:51:16 -04:00 • committed by GitHub
parent f64ff9ca1e
commit 8c649d33ee
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
139 changed files with 1711 additions and 1663 deletions

View file

@ -56,22 +56,23 @@ _dirent_exact_namelen(const struct dirent *d_)
static
int
_readdir(const Branches::Ptr &branches_,
const std::string &rel_dirpath_,
const fs::path &rel_dirpath_,
fuse_dirents_t *buf_)
{
Err err;
HashSet names;
std::string rel_filepath;
std::string abs_dirpath;
fs::path rel_filepath;
fs::path abs_dirpath;
fuse_dirents_reset(buf_);
rel_filepath = rel_dirpath_ / "dummy";
for(const auto &branch : *branches_)
{
int rv;
DIR *dh;
abs_dirpath = fs::path::make(branch.path,rel_dirpath_);
abs_dirpath = branch.path / rel_dirpath_;
errno = 0;
dh = fs::opendir(abs_dirpath);
@ -92,7 +93,7 @@ _readdir(const Branches::Ptr &branches_,
if(rv == 0)
continue;
rel_filepath = fs::path::make(rel_dirpath_,de->d_name);
rel_filepath.replace_filename(de->d_name);
de->d_ino = fs::inode::calc(branch.path,
rel_filepath,
DTTOIF(de->d_type),
@ -111,7 +112,7 @@ int
FUSE::ReadDirSeq::operator()(fuse_file_info_t const *ffi_,
fuse_dirents_t *buf_)
{
DirInfo *di = reinterpret_cast<DirInfo*>(ffi_->fh);
DirInfo *di = DirInfo::from_fh(ffi_->fh);
const fuse_context *fc = fuse_get_context();
const ugid::Set ugid(fc->uid,fc->gid);