mirror of
https://github.com/neovim/neovim.git
synced 2025-10-03 00:18:33 +00:00
os_nodetype: Return NODE_NORMAL if os_stat fails.
Conforms to Vim's mch_nodetype. Regression by 7db4a15
.
buf_write() expects NODE_WRITABLE for character devices such as
/dev/stderr.
Closes #4772
This commit is contained in:
@@ -111,8 +111,8 @@ int os_nodetype(const char *name)
|
||||
#endif
|
||||
|
||||
uv_stat_t statbuf;
|
||||
if (os_stat(name, &statbuf) == 0) {
|
||||
return NODE_NORMAL;
|
||||
if (0 != os_stat(name, &statbuf)) {
|
||||
return NODE_NORMAL; // File doesn't exist.
|
||||
}
|
||||
|
||||
#ifndef WIN32
|
||||
|
Reference in New Issue
Block a user