startup: allow a named pipe as file argument when --noread is used
This fixes https://savannah.gnu.org/bugs/?52896. Reported-by: Miki Strange <mik@mikistrange.com> Tested-by: Miki Strange <mik@mikistrange.com>
This commit is contained in:
parent
96b47f2877
commit
3981217e5a
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user