mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-10-26 19:01:56 -04:00
Start using std::filesystem::path for fusepath (#1522)
This commit is contained in:
parent
f64ff9ca1e
commit
8c649d33ee
139 changed files with 1711 additions and 1663 deletions
|
|
@ -112,7 +112,7 @@ _ioctl_file(const fuse_file_info_t *ffi_,
|
|||
void *data_,
|
||||
uint32_t *out_bufsz_)
|
||||
{
|
||||
FileInfo *fi = reinterpret_cast<FileInfo*>(ffi_->fh);
|
||||
FileInfo *fi = FileInfo::from_fh(ffi_->fh);
|
||||
const fuse_context *fc = fuse_get_context();
|
||||
const ugid::Set ugid(fc->uid,fc->gid);
|
||||
|
||||
|
|
@ -127,21 +127,21 @@ static
|
|||
int
|
||||
_ioctl_dir_base(const Policy::Search &searchFunc_,
|
||||
const Branches &branches_,
|
||||
const char *fusepath_,
|
||||
const fs::path &fusepath_,
|
||||
const uint32_t cmd_,
|
||||
void *data_,
|
||||
uint32_t *out_bufsz_)
|
||||
{
|
||||
int fd;
|
||||
int rv;
|
||||
std::string fullpath;
|
||||
fs::path fullpath;
|
||||
std::vector<Branch*> branches;
|
||||
|
||||
rv = searchFunc_(branches_,fusepath_,branches);
|
||||
if(rv < 0)
|
||||
return rv;
|
||||
|
||||
fullpath = fs::path::make(branches[0]->path,fusepath_);
|
||||
fullpath = branches[0]->path / fusepath_;
|
||||
|
||||
fd = fs::open(fullpath,O_RDONLY|O_NOATIME|O_NONBLOCK);
|
||||
if(fd < 0)
|
||||
|
|
@ -161,7 +161,7 @@ _ioctl_dir(const fuse_file_info_t *ffi_,
|
|||
void *data_,
|
||||
uint32_t *out_bufsz_)
|
||||
{
|
||||
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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue