{"action":"created","issue":{"url":"https://api.github.com/repos/neovim/neovim/issues/7561","repository_url":"https://api.github.com/repos/neovim/neovim","labels_url":"https://api.github.com/repos/neovim/neovim/issues/7561/labels{/name}","comments_url":"https://api.github.com/repos/neovim/neovim/issues/7561/comments","events_url":"https://api.github.com/repos/neovim/neovim/issues/7561/events","html_url":"https://github.com/neovim/neovim/pull/7561","id":273958995,"number":7561,"title":"os_open: return ENOENT on NULL filename arg","user":{"login":"justinmk","id":1359421,"avatar_url":"https://avatars0.githubusercontent.com/u/1359421?v=4","gravatar_id":"","url":"https://api.github.com/users/justinmk","html_url":"https://github.com/justinmk","followers_url":"https://api.github.com/users/justinmk/followers","following_url":"https://api.github.com/users/justinmk/following{/other_user}","gists_url":"https://api.github.com/users/justinmk/gists{/gist_id}","starred_url":"https://api.github.com/users/justinmk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justinmk/subscriptions","organizations_url":"https://api.github.com/users/justinmk/orgs","repos_url":"https://api.github.com/users/justinmk/repos","events_url":"https://api.github.com/users/justinmk/events{/privacy}","received_events_url":"https://api.github.com/users/justinmk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-11-14T22:01:16Z","updated_at":"2017-11-15T12:15:03Z","closed_at":null,"author_association":"OWNER","pull_request":{"url":"https://api.github.com/repos/neovim/neovim/pulls/7561","html_url":"https://github.com/neovim/neovim/pull/7561","diff_url":"https://github.com/neovim/neovim/pull/7561.diff","patch_url":"https://github.com/neovim/neovim/pull/7561.patch"},"body":"shada.c in particular checks explicitly for UV_ENOENT, so this is\r\na better choice that -1.\r\n\r\nos_nodetype: check for <0 instead of -1, this is the pattern throughout\r\nthe codebase (even in Vim, which uses open() directly).\r\n\r\nref #4370\r\nref https://github.com/neovim/neovim/issues/4370#issuecomment-344366571\r\nref ac055d677aa9eff9fca11cecb5ac7f7a4edb0265"},"comment":{"url":"https://api.github.com/repos/neovim/neovim/issues/comments/344575029","html_url":"https://github.com/neovim/neovim/pull/7561#issuecomment-344575029","issue_url":"https://api.github.com/repos/neovim/neovim/issues/7561","id":344575029,"user":{"login":"jamessan","id":112971,"avatar_url":"https://avatars0.githubusercontent.com/u/112971?v=4","gravatar_id":"","url":"https://api.github.com/users/jamessan","html_url":"https://github.com/jamessan","followers_url":"https://api.github.com/users/jamessan/followers","following_url":"https://api.github.com/users/jamessan/following{/other_user}","gists_url":"https://api.github.com/users/jamessan/gists{/gist_id}","starred_url":"https://api.github.com/users/jamessan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamessan/subscriptions","organizations_url":"https://api.github.com/users/jamessan/orgs","repos_url":"https://api.github.com/users/jamessan/repos","events_url":"https://api.github.com/users/jamessan/events{/privacy}","received_events_url":"https://api.github.com/users/jamessan/received_events","type":"User","site_admin":false},"created_at":"2017-11-15T12:15:03Z","updated_at":"2017-11-15T12:15:03Z","author_association":"MEMBER","body":"> Though I would say that UV_EINVAL is more appropriate for this error: the error is not that NULL file does not exist, it is that os_open can’t swallow NULL file.\r\n\r\n`open(2)` will set `errno` to `EFAULT` (\"bad address\") in this case, so I would argue `UV_EFAULT` is more faithful.\r\n\r\n> Alternative would not be not returning immediately with UV_EINVAL when NULL was encountered, but actually running uv_fs_open\r\n\r\nThat's not a possibility since `uv_fs_open` asserts that the given path is non-NULL.  That's what we're trying to fix.\r\n\r\nIt's probably worth adding a comment to that effect just before the NULL check so this isn't reverted later on, since \"let's use uv_fs_open's error\" is a reasonable idea."}}
{"actor":{"display_login":"jamessan"}}