{"action":"created","issue":{"url":"https://api.github.com/repos/kripken/emscripten/issues/4749","repository_url":"https://api.github.com/repos/kripken/emscripten","labels_url":"https://api.github.com/repos/kripken/emscripten/issues/4749/labels{/name}","comments_url":"https://api.github.com/repos/kripken/emscripten/issues/4749/comments","events_url":"https://api.github.com/repos/kripken/emscripten/issues/4749/events","html_url":"https://github.com/kripken/emscripten/pull/4749","id":190836495,"number":4749,"title":"Fix handling invalid path of chdir","user":{"login":"junjihashimoto","id":2469618,"avatar_url":"https://avatars.githubusercontent.com/u/2469618?v=3","gravatar_id":"","url":"https://api.github.com/users/junjihashimoto","html_url":"https://github.com/junjihashimoto","followers_url":"https://api.github.com/users/junjihashimoto/followers","following_url":"https://api.github.com/users/junjihashimoto/following{/other_user}","gists_url":"https://api.github.com/users/junjihashimoto/gists{/gist_id}","starred_url":"https://api.github.com/users/junjihashimoto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/junjihashimoto/subscriptions","organizations_url":"https://api.github.com/users/junjihashimoto/orgs","repos_url":"https://api.github.com/users/junjihashimoto/repos","events_url":"https://api.github.com/users/junjihashimoto/events{/privacy}","received_events_url":"https://api.github.com/users/junjihashimoto/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-11-21T21:10:00Z","updated_at":"2016-11-22T19:29:39Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/kripken/emscripten/pulls/4749","html_url":"https://github.com/kripken/emscripten/pull/4749","diff_url":"https://github.com/kripken/emscripten/pull/4749.diff","patch_url":"https://github.com/kripken/emscripten/pull/4749.patch"},"body":"Current ```chdir``` throws following exception when a path of chdir(path) is invalid.\r\nThis is because ```lookupPath``` returns ```node``` of ```null```, see https://github.com/kripken/emscripten/blob/incoming/src/library_fs.js#L47.\r\nThis PR fixes it to work like linux. \r\n\r\n```\r\n[TypeError: Cannot read property 'mode' of null]\r\n\r\n/tmp/emscripten_test_default_YmBq7Y/src.cpp.o.js:110\r\n      throw ex;\r\n      ^\r\nabort({}) at Error\r\n    at jsStackTrace (/tmp/emscripten_test_default_YmBq7Y/src.cpp.o.js:1092:13)\r\n    at stackTrace (/tmp/emscripten_test_default_YmBq7Y/src.cpp.o.js:1109:12)\r\n    at abort (/tmp/emscripten_test_default_YmBq7Y/src.cpp.o.js:12819:44)\r\n    at ___syscall12 (/tmp/emscripten_test_default_YmBq7Y/src.cpp.o.js:4697:69)\r\n```"},"comment":{"url":"https://api.github.com/repos/kripken/emscripten/issues/comments/262340562","html_url":"https://github.com/kripken/emscripten/pull/4749#issuecomment-262340562","issue_url":"https://api.github.com/repos/kripken/emscripten/issues/4749","id":262340562,"user":{"login":"kripken","id":173661,"avatar_url":"https://avatars.githubusercontent.com/u/173661?v=3","gravatar_id":"","url":"https://api.github.com/users/kripken","html_url":"https://github.com/kripken","followers_url":"https://api.github.com/users/kripken/followers","following_url":"https://api.github.com/users/kripken/following{/other_user}","gists_url":"https://api.github.com/users/kripken/gists{/gist_id}","starred_url":"https://api.github.com/users/kripken/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kripken/subscriptions","organizations_url":"https://api.github.com/users/kripken/orgs","repos_url":"https://api.github.com/users/kripken/repos","events_url":"https://api.github.com/users/kripken/events{/privacy}","received_events_url":"https://api.github.com/users/kripken/received_events","type":"User","site_admin":false},"created_at":"2016-11-22T19:29:39Z","updated_at":"2016-11-22T19:29:39Z","body":"Nice, thank you!"}}
{"actor":{"display_login":"kripken"}}