{"action":"created","comment":{"url":"https://api.github.com/repos/MovingBlocks/TerasologyLauncher/pulls/comments/93108736","pull_request_review_id":13630138,"id":93108736,"diff_hunk":"@@ -501,6 +512,15 @@ private void updateButtons() {\n             downloadButton.setVisible(true);\n             cancelDownloadButton.setVisible(false);\n         }\n+\n+        // if less than 200MB available\n+        if (downloadDirectory.getUsableSpace() <= 200 * 1000000) {","path":"src/main/java/org/terasology/launcher/gui/javafx/ApplicationController.java","position":72,"original_position":72,"commit_id":"a6faa6ef6c31be6c36423d67d4d3af53cadd22bb","original_commit_id":"a6faa6ef6c31be6c36423d67d4d3af53cadd22bb","user":{"login":"skaldarnar","id":1448874,"avatar_url":"https://avatars.githubusercontent.com/u/1448874?v=3","gravatar_id":"","url":"https://api.github.com/users/skaldarnar","html_url":"https://github.com/skaldarnar","followers_url":"https://api.github.com/users/skaldarnar/followers","following_url":"https://api.github.com/users/skaldarnar/following{/other_user}","gists_url":"https://api.github.com/users/skaldarnar/gists{/gist_id}","starred_url":"https://api.github.com/users/skaldarnar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skaldarnar/subscriptions","organizations_url":"https://api.github.com/users/skaldarnar/orgs","repos_url":"https://api.github.com/users/skaldarnar/repos","events_url":"https://api.github.com/users/skaldarnar/events{/privacy}","received_events_url":"https://api.github.com/users/skaldarnar/received_events","type":"User","site_admin":false},"body":"You can use something like \r\n```Java\r\nprivate static final long MB = 1024L * 1024;\r\nprivate static final long MINIMUM_FREE_SPACE_IN_MB = 200 * MB;\r\n```\r\nor just the `MB` if that's the only location where it is used. If it happens to be used more often, we could aim for a `ByteUnit` enum containing these constants...","created_at":"2016-12-19T20:04:38Z","updated_at":"2016-12-19T20:06:18Z","html_url":"https://github.com/MovingBlocks/TerasologyLauncher/pull/392#discussion_r93108736","pull_request_url":"https://api.github.com/repos/MovingBlocks/TerasologyLauncher/pulls/392","_links":{"self":{"href":"https://api.github.com/repos/MovingBlocks/TerasologyLauncher/pulls/comments/93108736"},"html":{"href":"https://github.com/MovingBlocks/TerasologyLauncher/pull/392#discussion_r93108736"},"pull_request":{"href":"https://api.github.com/repos/MovingBlocks/TerasologyLauncher/pulls/392"}}},"pull_request":{"url":"https://api.github.com/repos/MovingBlocks/TerasologyLauncher/pulls/392","id":98474391,"html_url":"https://github.com/MovingBlocks/TerasologyLauncher/pull/392","diff_url":"https://github.com/MovingBlocks/TerasologyLauncher/pull/392.diff","patch_url":"https://github.com/MovingBlocks/TerasologyLauncher/pull/392.patch","issue_url":"https://api.github.com/repos/MovingBlocks/TerasologyLauncher/issues/392","number":392,"state":"open","locked":false,"title":"Added check for insufficient space","user":{"login":"iojw","id":1729493,"avatar_url":"https://avatars.githubusercontent.com/u/1729493?v=3","gravatar_id":"","url":"https://api.github.com/users/iojw","html_url":"https://github.com/iojw","followers_url":"https://api.github.com/users/iojw/followers","following_url":"https://api.github.com/users/iojw/following{/other_user}","gists_url":"https://api.github.com/users/iojw/gists{/gist_id}","starred_url":"https://api.github.com/users/iojw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iojw/subscriptions","organizations_url":"https://api.github.com/users/iojw/orgs","repos_url":"https://api.github.com/users/iojw/repos","events_url":"https://api.github.com/users/iojw/events{/privacy}","received_events_url":"https://api.github.com/users/iojw/received_events","type":"User","site_admin":false},"body":"Addresses #390\r\n\r\nThe launcher now checks if there's sufficient space in the download directory before downloading the zip from Jenkins. It also sends a warning message that space is running low if the available space is less than twice the size of the zip file.\r\n\r\nAs for the warning sign, I haven't added it in first as I'm not sure what would be the best approach:\r\n\r\nI was thinking about the download icon turning yellow whenever the space is low, but that would involve setting the style using code so I'm not very sure if it's ok. Or would it be better if something like [this](https://upload.wikimedia.org/wikipedia/commons/c/ca/Icon_Simple_Warn.png) appeared in the lower left corner as a sign? For the threshold, I'm thinking about maybe when the available space goes below 200MB?\r\n\r\nLet me know what you think 🙂 ","created_at":"2016-12-18T13:23:33Z","updated_at":"2016-12-19T20:06:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c307287066005c927134fd618e11d4818ecd5b67","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/MovingBlocks/TerasologyLauncher/pulls/392/commits","review_comments_url":"https://api.github.com/repos/MovingBlocks/TerasologyLauncher/pulls/392/comments","review_comment_url":"https://api.github.com/repos/MovingBlocks/TerasologyLauncher/pulls/comments{/number}","comments_url":"https://api.github.com/repos/MovingBlocks/TerasologyLauncher/issues/392/comments","statuses_url":"https://api.github.com/repos/MovingBlocks/TerasologyLauncher/statuses/a6faa6ef6c31be6c36423d67d4d3af53cadd22bb","head":{"label":"iojw:insufficient_space","ref":"insufficient_space","sha":"a6faa6ef6c31be6c36423d67d4d3af53cadd22bb","user":{"login":"iojw","id":1729493,"avatar_url":"https://avatars.githubusercontent.com/u/1729493?v=3","gravatar_id":"","url":"https://api.github.com/users/iojw","html_url":"https://github.com/iojw","followers_url":"https://api.github.com/users/iojw/followers","following_url":"https://api.github.com/users/iojw/following{/other_user}","gists_url":"https://api.github.com/users/iojw/gists{/gist_id}","starred_url":"https://api.github.com/users/iojw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iojw/subscriptions","organizations_url":"https://api.github.com/users/iojw/orgs","repos_url":"https://api.github.com/users/iojw/repos","events_url":"https://api.github.com/users/iojw/events{/privacy}","received_events_url":"https://api.github.com/users/iojw/received_events","type":"User","site_admin":false},"repo":{"id":76172434,"name":"TerasologyLauncher","full_name":"iojw/TerasologyLauncher","owner":{"login":"iojw","id":1729493,"avatar_url":"https://avatars.githubusercontent.com/u/1729493?v=3","gravatar_id":"","url":"https://api.github.com/users/iojw","html_url":"https://github.com/iojw","followers_url":"https://api.github.com/users/iojw/followers","following_url":"https://api.github.com/users/iojw/following{/other_user}","gists_url":"https://api.github.com/users/iojw/gists{/gist_id}","starred_url":"https://api.github.com/users/iojw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iojw/subscriptions","organizations_url":"https://api.github.com/users/iojw/orgs","repos_url":"https://api.github.com/users/iojw/repos","events_url":"https://api.github.com/users/iojw/events{/privacy}","received_events_url":"https://api.github.com/users/iojw/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/iojw/TerasologyLauncher","description":"Terasology Launcher is the official launcher for the open source game Terasology.","fork":true,"url":"https://api.github.com/repos/iojw/TerasologyLauncher","forks_url":"https://api.github.com/repos/iojw/TerasologyLauncher/forks","keys_url":"https://api.github.com/repos/iojw/TerasologyLauncher/keys{/key_id}","collaborators_url":"https://api.github.com/repos/iojw/TerasologyLauncher/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/iojw/TerasologyLauncher/teams","hooks_url":"https://api.github.com/repos/iojw/TerasologyLauncher/hooks","issue_events_url":"https://api.github.com/repos/iojw/TerasologyLauncher/issues/events{/number}","events_url":"https://api.github.com/repos/iojw/TerasologyLauncher/events","assignees_url":"https://api.github.com/repos/iojw/TerasologyLauncher/assignees{/user}","branches_url":"https://api.github.com/repos/iojw/TerasologyLauncher/branches{/branch}","tags_url":"https://api.github.com/repos/iojw/TerasologyLauncher/tags","blobs_url":"https://api.github.com/repos/iojw/TerasologyLauncher/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/iojw/TerasologyLauncher/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/iojw/TerasologyLauncher/git/refs{/sha}","trees_url":"https://api.github.com/repos/iojw/TerasologyLauncher/git/trees{/sha}","statuses_url":"https://api.github.com/repos/iojw/TerasologyLauncher/statuses/{sha}","languages_url":"https://api.github.com/repos/iojw/TerasologyLauncher/languages","stargazers_url":"https://api.github.com/repos/iojw/TerasologyLauncher/stargazers","contributors_url":"https://api.github.com/repos/iojw/TerasologyLauncher/contributors","subscribers_url":"https://api.github.com/repos/iojw/TerasologyLauncher/subscribers","subscription_url":"https://api.github.com/repos/iojw/TerasologyLauncher/subscription","commits_url":"https://api.github.com/repos/iojw/TerasologyLauncher/commits{/sha}","git_commits_url":"https://api.github.com/repos/iojw/TerasologyLauncher/git/commits{/sha}","comments_url":"https://api.github.com/repos/iojw/TerasologyLauncher/comments{/number}","issue_comment_url":"https://api.github.com/repos/iojw/TerasologyLauncher/issues/comments{/number}","contents_url":"https://api.github.com/repos/iojw/TerasologyLauncher/contents/{+path}","compare_url":"https://api.github.com/repos/iojw/TerasologyLauncher/compare/{base}...{head}","merges_url":"https://api.github.com/repos/iojw/TerasologyLauncher/merges","archive_url":"https://api.github.com/repos/iojw/TerasologyLauncher/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/iojw/TerasologyLauncher/downloads","issues_url":"https://api.github.com/repos/iojw/TerasologyLauncher/issues{/number}","pulls_url":"https://api.github.com/repos/iojw/TerasologyLauncher/pulls{/number}","milestones_url":"https://api.github.com/repos/iojw/TerasologyLauncher/milestones{/number}","notifications_url":"https://api.github.com/repos/iojw/TerasologyLauncher/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/iojw/TerasologyLauncher/labels{/name}","releases_url":"https://api.github.com/repos/iojw/TerasologyLauncher/releases{/id}","deployments_url":"https://api.github.com/repos/iojw/TerasologyLauncher/deployments","created_at":"2016-12-11T12:17:12Z","updated_at":"2016-12-11T12:17:14Z","pushed_at":"2016-12-19T18:51:48Z","git_url":"git://github.com/iojw/TerasologyLauncher.git","ssh_url":"git@github.com:iojw/TerasologyLauncher.git","clone_url":"https://github.com/iojw/TerasologyLauncher.git","svn_url":"https://github.com/iojw/TerasologyLauncher","homepage":"http://terasology.org/","size":8379,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"MovingBlocks:develop","ref":"develop","sha":"9d3bbf476242fcd929d80cc38700fe4892016bf5","user":{"login":"MovingBlocks","id":1292442,"avatar_url":"https://avatars.githubusercontent.com/u/1292442?v=3","gravatar_id":"","url":"https://api.github.com/users/MovingBlocks","html_url":"https://github.com/MovingBlocks","followers_url":"https://api.github.com/users/MovingBlocks/followers","following_url":"https://api.github.com/users/MovingBlocks/following{/other_user}","gists_url":"https://api.github.com/users/MovingBlocks/gists{/gist_id}","starred_url":"https://api.github.com/users/MovingBlocks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MovingBlocks/subscriptions","organizations_url":"https://api.github.com/users/MovingBlocks/orgs","repos_url":"https://api.github.com/users/MovingBlocks/repos","events_url":"https://api.github.com/users/MovingBlocks/events{/privacy}","received_events_url":"https://api.github.com/users/MovingBlocks/received_events","type":"Organization","site_admin":false},"repo":{"id":8230327,"name":"TerasologyLauncher","full_name":"MovingBlocks/TerasologyLauncher","owner":{"login":"MovingBlocks","id":1292442,"avatar_url":"https://avatars.githubusercontent.com/u/1292442?v=3","gravatar_id":"","url":"https://api.github.com/users/MovingBlocks","html_url":"https://github.com/MovingBlocks","followers_url":"https://api.github.com/users/MovingBlocks/followers","following_url":"https://api.github.com/users/MovingBlocks/following{/other_user}","gists_url":"https://api.github.com/users/MovingBlocks/gists{/gist_id}","starred_url":"https://api.github.com/users/MovingBlocks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MovingBlocks/subscriptions","organizations_url":"https://api.github.com/users/MovingBlocks/orgs","repos_url":"https://api.github.com/users/MovingBlocks/repos","events_url":"https://api.github.com/users/MovingBlocks/events{/privacy}","received_events_url":"https://api.github.com/users/MovingBlocks/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/MovingBlocks/TerasologyLauncher","description":"Terasology Launcher is the official launcher for the open source game Terasology.","fork":false,"url":"https://api.github.com/repos/MovingBlocks/TerasologyLauncher","forks_url":"https://api.github.com/repos/MovingBlocks/TerasologyLauncher/forks","keys_url":"https://api.github.com/repos/MovingBlocks/TerasologyLauncher/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MovingBlocks/TerasologyLauncher/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MovingBlocks/TerasologyLauncher/teams","hooks_url":"https://api.github.com/repos/MovingBlocks/TerasologyLauncher/hooks","issue_events_url":"https://api.github.com/repos/MovingBlocks/TerasologyLauncher/issues/events{/number}","events_url":"https://api.github.com/repos/MovingBlocks/TerasologyLauncher/events","assignees_url":"https://api.github.com/repos/MovingBlocks/TerasologyLauncher/assignees{/user}","branches_url":"https://api.github.com/repos/MovingBlocks/TerasologyLauncher/branches{/branch}","tags_url":"https://api.github.com/repos/MovingBlocks/TerasologyLauncher/tags","blobs_url":"https://api.github.com/repos/MovingBlocks/TerasologyLauncher/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MovingBlocks/TerasologyLauncher/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MovingBlocks/TerasologyLauncher/git/refs{/sha}","trees_url":"https://api.github.com/repos/MovingBlocks/TerasologyLauncher/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MovingBlocks/TerasologyLauncher/statuses/{sha}","languages_url":"https://api.github.com/repos/MovingBlocks/TerasologyLauncher/languages","stargazers_url":"https://api.github.com/repos/MovingBlocks/TerasologyLauncher/stargazers","contributors_url":"https://api.github.com/repos/MovingBlocks/TerasologyLauncher/contributors","subscribers_url":"https://api.github.com/repos/MovingBlocks/TerasologyLauncher/subscribers","subscription_url":"https://api.github.com/repos/MovingBlocks/TerasologyLauncher/subscription","commits_url":"https://api.github.com/repos/MovingBlocks/TerasologyLauncher/commits{/sha}","git_commits_url":"https://api.github.com/repos/MovingBlocks/TerasologyLauncher/git/commits{/sha}","comments_url":"https://api.github.com/repos/MovingBlocks/TerasologyLauncher/comments{/number}","issue_comment_url":"https://api.github.com/repos/MovingBlocks/TerasologyLauncher/issues/comments{/number}","contents_url":"https://api.github.com/repos/MovingBlocks/TerasologyLauncher/contents/{+path}","compare_url":"https://api.github.com/repos/MovingBlocks/TerasologyLauncher/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MovingBlocks/TerasologyLauncher/merges","archive_url":"https://api.github.com/repos/MovingBlocks/TerasologyLauncher/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MovingBlocks/TerasologyLauncher/downloads","issues_url":"https://api.github.com/repos/MovingBlocks/TerasologyLauncher/issues{/number}","pulls_url":"https://api.github.com/repos/MovingBlocks/TerasologyLauncher/pulls{/number}","milestones_url":"https://api.github.com/repos/MovingBlocks/TerasologyLauncher/milestones{/number}","notifications_url":"https://api.github.com/repos/MovingBlocks/TerasologyLauncher/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MovingBlocks/TerasologyLauncher/labels{/name}","releases_url":"https://api.github.com/repos/MovingBlocks/TerasologyLauncher/releases{/id}","deployments_url":"https://api.github.com/repos/MovingBlocks/TerasologyLauncher/deployments","created_at":"2013-02-16T02:40:00Z","updated_at":"2016-12-13T14:48:48Z","pushed_at":"2016-12-19T19:02:55Z","git_url":"git://github.com/MovingBlocks/TerasologyLauncher.git","ssh_url":"git@github.com:MovingBlocks/TerasologyLauncher.git","clone_url":"https://github.com/MovingBlocks/TerasologyLauncher.git","svn_url":"https://github.com/MovingBlocks/TerasologyLauncher","homepage":"http://terasology.org/","size":9631,"stargazers_count":67,"watchers_count":67,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":43,"mirror_url":null,"open_issues_count":48,"forks":43,"open_issues":48,"watchers":67,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/MovingBlocks/TerasologyLauncher/pulls/392"},"html":{"href":"https://github.com/MovingBlocks/TerasologyLauncher/pull/392"},"issue":{"href":"https://api.github.com/repos/MovingBlocks/TerasologyLauncher/issues/392"},"comments":{"href":"https://api.github.com/repos/MovingBlocks/TerasologyLauncher/issues/392/comments"},"review_comments":{"href":"https://api.github.com/repos/MovingBlocks/TerasologyLauncher/pulls/392/comments"},"review_comment":{"href":"https://api.github.com/repos/MovingBlocks/TerasologyLauncher/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/MovingBlocks/TerasologyLauncher/pulls/392/commits"},"statuses":{"href":"https://api.github.com/repos/MovingBlocks/TerasologyLauncher/statuses/a6faa6ef6c31be6c36423d67d4d3af53cadd22bb"}}}}
{"actor":{"display_login":"skaldarnar"}}