{"action":"created","issue":{"url":"https://api.github.com/repos/unioslo/tsdfx/issues/106","repository_url":"https://api.github.com/repos/unioslo/tsdfx","labels_url":"https://api.github.com/repos/unioslo/tsdfx/issues/106/labels{/name}","comments_url":"https://api.github.com/repos/unioslo/tsdfx/issues/106/comments","events_url":"https://api.github.com/repos/unioslo/tsdfx/issues/106/events","html_url":"https://github.com/unioslo/tsdfx/pull/106","id":162081581,"number":106,"title":"Use correct mode when opening a new directory.","user":{"login":"petterreinholdtsen","id":731031,"avatar_url":"https://avatars.githubusercontent.com/u/731031?v=3","gravatar_id":"","url":"https://api.github.com/users/petterreinholdtsen","html_url":"https://github.com/petterreinholdtsen","followers_url":"https://api.github.com/users/petterreinholdtsen/followers","following_url":"https://api.github.com/users/petterreinholdtsen/following{/other_user}","gists_url":"https://api.github.com/users/petterreinholdtsen/gists{/gist_id}","starred_url":"https://api.github.com/users/petterreinholdtsen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petterreinholdtsen/subscriptions","organizations_url":"https://api.github.com/users/petterreinholdtsen/orgs","repos_url":"https://api.github.com/users/petterreinholdtsen/repos","events_url":"https://api.github.com/users/petterreinholdtsen/events{/privacy}","received_events_url":"https://api.github.com/users/petterreinholdtsen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-06-24T05:58:39Z","updated_at":"2016-06-24T07:42:59Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/unioslo/tsdfx/pulls/106","html_url":"https://github.com/unioslo/tsdfx/pull/106","diff_url":"https://github.com/unioslo/tsdfx/pull/106.diff","patch_url":"https://github.com/unioslo/tsdfx/pull/106.patch"},"body":"The open() call after mkdir() would always fail with EISDIR on Linux,\r\nbecause the mode used was the saved one, not the calculated one, and\r\nbecause the mode included O_CREAT.  Change the code to remove\r\nO_CREAT from the calculated one and use it instead.\r\n\r\nAdd O_DIRECTORY to make sure the open() fail if someone replaced the\r\ndirectory with a file.\r\n\r\nAdd test script demonstrating the problem and verifying its fix."},"comment":{"url":"https://api.github.com/repos/unioslo/tsdfx/issues/comments/228278555","html_url":"https://github.com/unioslo/tsdfx/pull/106#issuecomment-228278555","issue_url":"https://api.github.com/repos/unioslo/tsdfx/issues/106","id":228278555,"user":{"login":"dag-erling","id":4972155,"avatar_url":"https://avatars.githubusercontent.com/u/4972155?v=3","gravatar_id":"","url":"https://api.github.com/users/dag-erling","html_url":"https://github.com/dag-erling","followers_url":"https://api.github.com/users/dag-erling/followers","following_url":"https://api.github.com/users/dag-erling/following{/other_user}","gists_url":"https://api.github.com/users/dag-erling/gists{/gist_id}","starred_url":"https://api.github.com/users/dag-erling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dag-erling/subscriptions","organizations_url":"https://api.github.com/users/dag-erling/orgs","repos_url":"https://api.github.com/users/dag-erling/repos","events_url":"https://api.github.com/users/dag-erling/events{/privacy}","received_events_url":"https://api.github.com/users/dag-erling/received_events","type":"User","site_admin":false},"created_at":"2016-06-24T07:42:59Z","updated_at":"2016-06-24T07:42:59Z","body":"`O_DIRECTORY` is not portable and made redundant by the `fstat()` call right below."}}
{"actor":{"display_login":"dag-erling"}}