mirror of
https://github.com/trapexit/mergerfs.git
synced 2024-11-23 07:32:35 +08:00
fix ioctl on directories
This commit is contained in:
parent
13511ea72a
commit
23b8e4582e
|
@ -20,8 +20,10 @@
|
|||
#include <vector>
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <linux/fs.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "config.hpp"
|
||||
#include "fileinfo.hpp"
|
||||
|
@ -48,10 +50,6 @@ _ioctl(const int fd,
|
|||
|
||||
#ifdef FUSE_IOCTL_DIR
|
||||
|
||||
#ifndef O_DIRECTORY
|
||||
#define O_DIRECTORY 0
|
||||
#endif
|
||||
|
||||
#ifndef O_NOATIME
|
||||
#define O_NOATIME 0
|
||||
#endif
|
||||
|
@ -76,7 +74,7 @@ _ioctl_dir_base(Policy::Func::Search searchFunc,
|
|||
|
||||
fs::path::make(basepaths[0],fusepath,fullpath);
|
||||
|
||||
const int flags = O_RDWR | O_NOATIME | O_DIRECTORY;
|
||||
const int flags = O_RDONLY | O_NOATIME | O_NONBLOCK;
|
||||
fd = ::open(fullpath.c_str(),flags);
|
||||
if(fd == -1)
|
||||
return -errno;
|
||||
|
|
Loading…
Reference in New Issue
Block a user