diff --git a/src/ioctl.cpp b/src/ioctl.cpp index 4b35b1dd..19bdbb0e 100644 --- a/src/ioctl.cpp +++ b/src/ioctl.cpp @@ -20,8 +20,10 @@ #include #include +#include #include -#include +#include +#include #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;