Commit 3981217e authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

startup: allow a named pipe as file argument when --noread is used

This fixes https://savannah.gnu.org/bugs/?52896

.
Reported-by: default avatarMiki Strange <mik@mikistrange.com>
Tested-by: default avatarMiki Strange <mik@mikistrange.com>
No related merge requests found
Showing with 2 additions and 1 deletion
+2 -1
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment