{"action":"created","issue":{"url":"https://api.github.com/repos/k9mail/k-9/issues/584","labels_url":"https://api.github.com/repos/k9mail/k-9/issues/584/labels{/name}","comments_url":"https://api.github.com/repos/k9mail/k-9/issues/584/comments","events_url":"https://api.github.com/repos/k9mail/k-9/issues/584/events","html_url":"https://github.com/k9mail/k-9/pull/584","id":62838637,"number":584,"title":"Synchronize createUniqueFile to prevent race on file.exists","user":{"login":"DanielHeath","id":47430,"avatar_url":"https://avatars.githubusercontent.com/u/47430?v=3","gravatar_id":"","url":"https://api.github.com/users/DanielHeath","html_url":"https://github.com/DanielHeath","followers_url":"https://api.github.com/users/DanielHeath/followers","following_url":"https://api.github.com/users/DanielHeath/following{/other_user}","gists_url":"https://api.github.com/users/DanielHeath/gists{/gist_id}","starred_url":"https://api.github.com/users/DanielHeath/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DanielHeath/subscriptions","organizations_url":"https://api.github.com/users/DanielHeath/orgs","repos_url":"https://api.github.com/users/DanielHeath/repos","events_url":"https://api.github.com/users/DanielHeath/events{/privacy}","received_events_url":"https://api.github.com/users/DanielHeath/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-19T01:05:31Z","updated_at":"2015-03-19T01:12:27Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/k9mail/k-9/pulls/584","html_url":"https://github.com/k9mail/k-9/pull/584","diff_url":"https://github.com/k9mail/k-9/pull/584.diff","patch_url":"https://github.com/k9mail/k-9/pull/584.patch"},"body":"See https://github.com/k9mail/k-9/issues/583#issuecomment-83237076"},"comment":{"url":"https://api.github.com/repos/k9mail/k-9/issues/comments/83244788","html_url":"https://github.com/k9mail/k-9/pull/584#issuecomment-83244788","issue_url":"https://api.github.com/repos/k9mail/k-9/issues/584","id":83244788,"user":{"login":"cketti","id":218061,"avatar_url":"https://avatars.githubusercontent.com/u/218061?v=3","gravatar_id":"","url":"https://api.github.com/users/cketti","html_url":"https://github.com/cketti","followers_url":"https://api.github.com/users/cketti/followers","following_url":"https://api.github.com/users/cketti/following{/other_user}","gists_url":"https://api.github.com/users/cketti/gists{/gist_id}","starred_url":"https://api.github.com/users/cketti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cketti/subscriptions","organizations_url":"https://api.github.com/users/cketti/orgs","repos_url":"https://api.github.com/users/cketti/repos","events_url":"https://api.github.com/users/cketti/events{/privacy}","received_events_url":"https://api.github.com/users/cketti/received_events","type":"User","site_admin":false},"created_at":"2015-03-19T01:12:27Z","updated_at":"2015-03-19T01:12:27Z","body":"To fix the race condition you have to actually create the file in that method. Otherwise calling the method twice in a row (doesn't really matter if from different threads or the same) will return the same file name.\r\n\r\nIt would also be nice to have a test that calls the method twice and makes sure the returned files are different.\r\n"}}