diff --git a/src/files.c b/src/files.c index fd02814c2c98aae3f5f31921526fee95d78537be..b77d6779b57e0e8c41af09636dcb198ce79509ff 100644 --- a/src/files.c +++ b/src/files.c @@ -435,7 +435,8 @@ bool open_buffer(const char *filename, bool undoable) if (strcmp(filename, "") != 0) { struct stat fileinfo; - if (stat(realname, &fileinfo) == 0 && !S_ISREG(fileinfo.st_mode)) { + if (stat(realname, &fileinfo) == 0 && !(S_ISREG(fileinfo.st_mode) || + (ISSET(NOREAD_MODE) && S_ISFIFO(fileinfo.st_mode)))) { if (S_ISDIR(fileinfo.st_mode)) statusline(ALERT, _("\"%s\" is a directory"), realname); else