{"action":"created","issue":{"url":"https://api.github.com/repos/apple/swift-corelibs-foundation/issues/1297","repository_url":"https://api.github.com/repos/apple/swift-corelibs-foundation","labels_url":"https://api.github.com/repos/apple/swift-corelibs-foundation/issues/1297/labels{/name}","comments_url":"https://api.github.com/repos/apple/swift-corelibs-foundation/issues/1297/comments","events_url":"https://api.github.com/repos/apple/swift-corelibs-foundation/issues/1297/events","html_url":"https://github.com/apple/swift-corelibs-foundation/pull/1297","id":271148746,"number":1297,"title":"Fix FileHandle.truncateFile()","user":{"login":"DagAgren","id":11536828,"avatar_url":"https://avatars0.githubusercontent.com/u/11536828?v=4","gravatar_id":"","url":"https://api.github.com/users/DagAgren","html_url":"https://github.com/DagAgren","followers_url":"https://api.github.com/users/DagAgren/followers","following_url":"https://api.github.com/users/DagAgren/following{/other_user}","gists_url":"https://api.github.com/users/DagAgren/gists{/gist_id}","starred_url":"https://api.github.com/users/DagAgren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DagAgren/subscriptions","organizations_url":"https://api.github.com/users/DagAgren/orgs","repos_url":"https://api.github.com/users/DagAgren/repos","events_url":"https://api.github.com/users/DagAgren/events{/privacy}","received_events_url":"https://api.github.com/users/DagAgren/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-11-04T00:00:54Z","updated_at":"2017-11-22T18:24:25Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/apple/swift-corelibs-foundation/pulls/1297","html_url":"https://github.com/apple/swift-corelibs-foundation/pull/1297","diff_url":"https://github.com/apple/swift-corelibs-foundation/pull/1297.diff","patch_url":"https://github.com/apple/swift-corelibs-foundation/pull/1297.patch"},"body":"FileHandle.truncateFile() currently does not work. It attempts to do a lseek() to the requested file size, which is not required before calling ftruncate. Furthermore, it expects this call to lseek() to return 0, which only happens if truncateFile() is called with a 0 size. Thus, the function will only succeed if called to truncate the file to zero bytes. In other cases, it will silently fail."},"comment":{"url":"https://api.github.com/repos/apple/swift-corelibs-foundation/issues/comments/346434922","html_url":"https://github.com/apple/swift-corelibs-foundation/pull/1297#issuecomment-346434922","issue_url":"https://api.github.com/repos/apple/swift-corelibs-foundation/issues/1297","id":346434922,"user":{"login":"DagAgren","id":11536828,"avatar_url":"https://avatars0.githubusercontent.com/u/11536828?v=4","gravatar_id":"","url":"https://api.github.com/users/DagAgren","html_url":"https://github.com/DagAgren","followers_url":"https://api.github.com/users/DagAgren/followers","following_url":"https://api.github.com/users/DagAgren/following{/other_user}","gists_url":"https://api.github.com/users/DagAgren/gists{/gist_id}","starred_url":"https://api.github.com/users/DagAgren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DagAgren/subscriptions","organizations_url":"https://api.github.com/users/DagAgren/orgs","repos_url":"https://api.github.com/users/DagAgren/repos","events_url":"https://api.github.com/users/DagAgren/events{/privacy}","received_events_url":"https://api.github.com/users/DagAgren/received_events","type":"User","site_admin":false},"created_at":"2017-11-22T18:24:25Z","updated_at":"2017-11-22T18:24:25Z","author_association":"NONE","body":"Sorry, I don't have an actual setup to build the code. I made this change quickly through github when I noticed the code was wrong while looking it up."}}
{"actor":{"display_login":"DagAgren"}}