diff --git a/sortix/fs/ramfs.cpp b/sortix/fs/ramfs.cpp index b3e36401..cd4c8602 100644 --- a/sortix/fs/ramfs.cpp +++ b/sortix/fs/ramfs.cpp @@ -250,6 +250,8 @@ namespace Sortix return NULL; } + if ( (flags & O_LOWERFLAGS) == O_SEARCH ) { Error::Set(ENOTDIR); return NULL; } + DevBuffer* file = OpenFile(path, flags, mode); if ( !file ) { return NULL; } Device* wrapper = new DevFileWrapper(file, flags);