{"action":"created","issue":{"url":"https://api.github.com/repos/nodejs/node/issues/18548","repository_url":"https://api.github.com/repos/nodejs/node","labels_url":"https://api.github.com/repos/nodejs/node/issues/18548/labels{/name}","comments_url":"https://api.github.com/repos/nodejs/node/issues/18548/comments","events_url":"https://api.github.com/repos/nodejs/node/issues/18548/events","html_url":"https://github.com/nodejs/node/pull/18548","id":294113178,"number":18548,"title":"fs: fix misplaced errors in fs.symlinkSync","user":{"login":"joyeecheung","id":4299420,"avatar_url":"https://avatars0.githubusercontent.com/u/4299420?v=4","gravatar_id":"","url":"https://api.github.com/users/joyeecheung","html_url":"https://github.com/joyeecheung","followers_url":"https://api.github.com/users/joyeecheung/followers","following_url":"https://api.github.com/users/joyeecheung/following{/other_user}","gists_url":"https://api.github.com/users/joyeecheung/gists{/gist_id}","starred_url":"https://api.github.com/users/joyeecheung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joyeecheung/subscriptions","organizations_url":"https://api.github.com/users/joyeecheung/orgs","repos_url":"https://api.github.com/users/joyeecheung/repos","events_url":"https://api.github.com/users/joyeecheung/events{/privacy}","received_events_url":"https://api.github.com/users/joyeecheung/received_events","type":"User","site_admin":false},"labels":[{"id":155435785,"url":"https://api.github.com/repos/nodejs/node/labels/fs","name":"fs","color":"0052cc","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-02-03T14:05:18Z","updated_at":"2018-02-08T13:57:50Z","closed_at":"2018-02-08T13:57:50Z","author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/nodejs/node/pulls/18548","html_url":"https://github.com/nodejs/node/pull/18548","diff_url":"https://github.com/nodejs/node/pull/18548.diff","patch_url":"https://github.com/nodejs/node/pull/18548.patch"},"body":"<!--\r\nThank you for your pull request. Please provide a description above and review\r\nthe requirements below.\r\n\r\nBug fixes and new features should include tests and possibly benchmarks.\r\n\r\nContributors guide: https://github.com/nodejs/node/blob/master/CONTRIBUTING.md\r\n-->\r\n\r\nThe ctx.error is supposed to be handled in fs.readlinkSync,\r\nbut was handled in fs.symlinkSync by mistake.\r\n\r\nAlso fix the error number check in readlink to be consistent\r\nwith SYNC_CALL.\r\n\r\nRefs: https://github.com/nodejs/node/pull/18348\r\n\r\nThis is an oversight of https://github.com/nodejs/node/pull/18348, the error handling was supposed to be in `fs.readlinkSync` instead of `fs.symlinkSync`. I couldn't come up with a test because these errors cannot be triggered easily:\r\n\r\nhttps://github.com/nodejs/node/blob/1286923cc05e3e7a726fc682be54212ccfc66812/src/string_bytes.cc#L41-L51\r\n\r\n##### Checklist\r\n<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->\r\n\r\n- [x] `make -j4 test` (UNIX), or `vcbuild test` (Windows) passes\r\n- [x] commit message follows [commit guidelines](https://github.com/nodejs/node/blob/master/doc/guides/contributing/pull-requests.md#commit-message-guidelines)\r\n\r\n##### Affected core subsystem(s)\r\n<!-- Provide affected core subsystem(s) (like doc, cluster, crypto, etc). -->\r\nfs"},"comment":{"url":"https://api.github.com/repos/nodejs/node/issues/comments/364118851","html_url":"https://github.com/nodejs/node/pull/18548#issuecomment-364118851","issue_url":"https://api.github.com/repos/nodejs/node/issues/18548","id":364118851,"user":{"login":"joyeecheung","id":4299420,"avatar_url":"https://avatars0.githubusercontent.com/u/4299420?v=4","gravatar_id":"","url":"https://api.github.com/users/joyeecheung","html_url":"https://github.com/joyeecheung","followers_url":"https://api.github.com/users/joyeecheung/followers","following_url":"https://api.github.com/users/joyeecheung/following{/other_user}","gists_url":"https://api.github.com/users/joyeecheung/gists{/gist_id}","starred_url":"https://api.github.com/users/joyeecheung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joyeecheung/subscriptions","organizations_url":"https://api.github.com/users/joyeecheung/orgs","repos_url":"https://api.github.com/users/joyeecheung/repos","events_url":"https://api.github.com/users/joyeecheung/events{/privacy}","received_events_url":"https://api.github.com/users/joyeecheung/received_events","type":"User","site_admin":false},"created_at":"2018-02-08T13:57:50Z","updated_at":"2018-02-08T13:57:50Z","author_association":"CONTRIBUTOR","body":"Landed in b1c6ecb2c674f43290ad772bc464568aa42ef5d0, thanks!"}}
{"actor":{"display_login":"joyeecheung"}}