{"action":"created","comment":{"url":"https://api.github.com/repos/mapsme/omim/pulls/comments/58344913","id":58344913,"diff_hunk":"@@ -24,8 +24,12 @@ bool IsEnoughSpaceForDownload(TCountryId const & countryId, Storage const & stor\n {\n   NodeAttrs nodeAttrs;\n   storage.GetNodeAttrs(countryId, nodeAttrs);\n-  size_t constexpr kDownloadExtraSpaceSize = 1 /*Mb*/ * 1024 * 1024;\n-  size_t const downloadSpaceSize = kDownloadExtraSpaceSize + nodeAttrs.m_mwmSize;\n+  // Mwm size is less than 100 MB. In case of map update at first we download updated map and only\n+  // after that we do delete the obsolete map. So in such a case we might need up to 100 MB of extra\n+  // space.\n+  size_t constexpr kDownloadExtraSpaceSize = 100 /*Mb*/ * 1024 * 1024;","path":"storage/storage_helpers.cpp","position":9,"original_position":9,"commit_id":"f4e9f87424a6fe02450ba8a16c795e04415722f4","original_commit_id":"f4e9f87424a6fe02450ba8a16c795e04415722f4","user":{"login":"bykoianko","id":1768114,"avatar_url":"https://avatars.githubusercontent.com/u/1768114?v=3","gravatar_id":"","url":"https://api.github.com/users/bykoianko","html_url":"https://github.com/bykoianko","followers_url":"https://api.github.com/users/bykoianko/followers","following_url":"https://api.github.com/users/bykoianko/following{/other_user}","gists_url":"https://api.github.com/users/bykoianko/gists{/gist_id}","starred_url":"https://api.github.com/users/bykoianko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bykoianko/subscriptions","organizations_url":"https://api.github.com/users/bykoianko/orgs","repos_url":"https://api.github.com/users/bykoianko/repos","events_url":"https://api.github.com/users/bykoianko/events{/privacy}","received_events_url":"https://api.github.com/users/bykoianko/received_events","type":"User","site_admin":false},"body":"Может вынести в storage_helpers.hpp и назвать\r\nsize_t constexpr kMaxMwmSizeBytes  = 100 /*Mb*/ * 1024 * 1024;\r\n?","created_at":"2016-04-04T08:53:52Z","updated_at":"2016-04-04T08:53:52Z","html_url":"https://github.com/mapsme/omim/pull/2704#discussion_r58344913","pull_request_url":"https://api.github.com/repos/mapsme/omim/pulls/2704","_links":{"self":{"href":"https://api.github.com/repos/mapsme/omim/pulls/comments/58344913"},"html":{"href":"https://github.com/mapsme/omim/pull/2704#discussion_r58344913"},"pull_request":{"href":"https://api.github.com/repos/mapsme/omim/pulls/2704"}}},"pull_request":{"url":"https://api.github.com/repos/mapsme/omim/pulls/2704","id":65108929,"html_url":"https://github.com/mapsme/omim/pull/2704","diff_url":"https://github.com/mapsme/omim/pull/2704.diff","patch_url":"https://github.com/mapsme/omim/pull/2704.patch","issue_url":"https://api.github.com/repos/mapsme/omim/issues/2704","number":2704,"state":"open","locked":false,"title":"[ios] Added storage space check before download.","user":{"login":"igrechuhin","id":2698571,"avatar_url":"https://avatars.githubusercontent.com/u/2698571?v=3","gravatar_id":"","url":"https://api.github.com/users/igrechuhin","html_url":"https://github.com/igrechuhin","followers_url":"https://api.github.com/users/igrechuhin/followers","following_url":"https://api.github.com/users/igrechuhin/following{/other_user}","gists_url":"https://api.github.com/users/igrechuhin/gists{/gist_id}","starred_url":"https://api.github.com/users/igrechuhin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/igrechuhin/subscriptions","organizations_url":"https://api.github.com/users/igrechuhin/orgs","repos_url":"https://api.github.com/users/igrechuhin/repos","events_url":"https://api.github.com/users/igrechuhin/events{/privacy}","received_events_url":"https://api.github.com/users/igrechuhin/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-04-04T08:15:08Z","updated_at":"2016-04-04T08:53:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1e404cb000bdc05667bec9910a7d86fdf90fe67a","assignee":{"login":"bykoianko","id":1768114,"avatar_url":"https://avatars.githubusercontent.com/u/1768114?v=3","gravatar_id":"","url":"https://api.github.com/users/bykoianko","html_url":"https://github.com/bykoianko","followers_url":"https://api.github.com/users/bykoianko/followers","following_url":"https://api.github.com/users/bykoianko/following{/other_user}","gists_url":"https://api.github.com/users/bykoianko/gists{/gist_id}","starred_url":"https://api.github.com/users/bykoianko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bykoianko/subscriptions","organizations_url":"https://api.github.com/users/bykoianko/orgs","repos_url":"https://api.github.com/users/bykoianko/repos","events_url":"https://api.github.com/users/bykoianko/events{/privacy}","received_events_url":"https://api.github.com/users/bykoianko/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/mapsme/omim/pulls/2704/commits","review_comments_url":"https://api.github.com/repos/mapsme/omim/pulls/2704/comments","review_comment_url":"https://api.github.com/repos/mapsme/omim/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mapsme/omim/issues/2704/comments","statuses_url":"https://api.github.com/repos/mapsme/omim/statuses/f4e9f87424a6fe02450ba8a16c795e04415722f4","head":{"label":"igrechuhin:ig-master","ref":"ig-master","sha":"f4e9f87424a6fe02450ba8a16c795e04415722f4","user":{"login":"igrechuhin","id":2698571,"avatar_url":"https://avatars.githubusercontent.com/u/2698571?v=3","gravatar_id":"","url":"https://api.github.com/users/igrechuhin","html_url":"https://github.com/igrechuhin","followers_url":"https://api.github.com/users/igrechuhin/followers","following_url":"https://api.github.com/users/igrechuhin/following{/other_user}","gists_url":"https://api.github.com/users/igrechuhin/gists{/gist_id}","starred_url":"https://api.github.com/users/igrechuhin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/igrechuhin/subscriptions","organizations_url":"https://api.github.com/users/igrechuhin/orgs","repos_url":"https://api.github.com/users/igrechuhin/repos","events_url":"https://api.github.com/users/igrechuhin/events{/privacy}","received_events_url":"https://api.github.com/users/igrechuhin/received_events","type":"User","site_admin":false},"repo":{"id":43428422,"name":"omim","full_name":"igrechuhin/omim","owner":{"login":"igrechuhin","id":2698571,"avatar_url":"https://avatars.githubusercontent.com/u/2698571?v=3","gravatar_id":"","url":"https://api.github.com/users/igrechuhin","html_url":"https://github.com/igrechuhin","followers_url":"https://api.github.com/users/igrechuhin/followers","following_url":"https://api.github.com/users/igrechuhin/following{/other_user}","gists_url":"https://api.github.com/users/igrechuhin/gists{/gist_id}","starred_url":"https://api.github.com/users/igrechuhin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/igrechuhin/subscriptions","organizations_url":"https://api.github.com/users/igrechuhin/orgs","repos_url":"https://api.github.com/users/igrechuhin/repos","events_url":"https://api.github.com/users/igrechuhin/events{/privacy}","received_events_url":"https://api.github.com/users/igrechuhin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/igrechuhin/omim","description":"MAPS.ME - Offline OpenStreetMap maps for iOS/Android/Mac/Linux/Windows","fork":true,"url":"https://api.github.com/repos/igrechuhin/omim","forks_url":"https://api.github.com/repos/igrechuhin/omim/forks","keys_url":"https://api.github.com/repos/igrechuhin/omim/keys{/key_id}","collaborators_url":"https://api.github.com/repos/igrechuhin/omim/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/igrechuhin/omim/teams","hooks_url":"https://api.github.com/repos/igrechuhin/omim/hooks","issue_events_url":"https://api.github.com/repos/igrechuhin/omim/issues/events{/number}","events_url":"https://api.github.com/repos/igrechuhin/omim/events","assignees_url":"https://api.github.com/repos/igrechuhin/omim/assignees{/user}","branches_url":"https://api.github.com/repos/igrechuhin/omim/branches{/branch}","tags_url":"https://api.github.com/repos/igrechuhin/omim/tags","blobs_url":"https://api.github.com/repos/igrechuhin/omim/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/igrechuhin/omim/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/igrechuhin/omim/git/refs{/sha}","trees_url":"https://api.github.com/repos/igrechuhin/omim/git/trees{/sha}","statuses_url":"https://api.github.com/repos/igrechuhin/omim/statuses/{sha}","languages_url":"https://api.github.com/repos/igrechuhin/omim/languages","stargazers_url":"https://api.github.com/repos/igrechuhin/omim/stargazers","contributors_url":"https://api.github.com/repos/igrechuhin/omim/contributors","subscribers_url":"https://api.github.com/repos/igrechuhin/omim/subscribers","subscription_url":"https://api.github.com/repos/igrechuhin/omim/subscription","commits_url":"https://api.github.com/repos/igrechuhin/omim/commits{/sha}","git_commits_url":"https://api.github.com/repos/igrechuhin/omim/git/commits{/sha}","comments_url":"https://api.github.com/repos/igrechuhin/omim/comments{/number}","issue_comment_url":"https://api.github.com/repos/igrechuhin/omim/issues/comments{/number}","contents_url":"https://api.github.com/repos/igrechuhin/omim/contents/{+path}","compare_url":"https://api.github.com/repos/igrechuhin/omim/compare/{base}...{head}","merges_url":"https://api.github.com/repos/igrechuhin/omim/merges","archive_url":"https://api.github.com/repos/igrechuhin/omim/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/igrechuhin/omim/downloads","issues_url":"https://api.github.com/repos/igrechuhin/omim/issues{/number}","pulls_url":"https://api.github.com/repos/igrechuhin/omim/pulls{/number}","milestones_url":"https://api.github.com/repos/igrechuhin/omim/milestones{/number}","notifications_url":"https://api.github.com/repos/igrechuhin/omim/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/igrechuhin/omim/labels{/name}","releases_url":"https://api.github.com/repos/igrechuhin/omim/releases{/id}","deployments_url":"https://api.github.com/repos/igrechuhin/omim/deployments","created_at":"2015-09-30T11:08:48Z","updated_at":"2015-09-30T11:10:58Z","pushed_at":"2016-04-04T08:47:50Z","git_url":"git://github.com/igrechuhin/omim.git","ssh_url":"git@github.com:igrechuhin/omim.git","clone_url":"https://github.com/igrechuhin/omim.git","svn_url":"https://github.com/igrechuhin/omim","homepage":null,"size":2293297,"stargazers_count":0,"watchers_count":0,"language":"C++","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":"master"}},"base":{"label":"mapsme:master","ref":"master","sha":"a94e2d2f4dd728249cdb31497d724c8583654b1b","user":{"login":"mapsme","id":14185141,"avatar_url":"https://avatars.githubusercontent.com/u/14185141?v=3","gravatar_id":"","url":"https://api.github.com/users/mapsme","html_url":"https://github.com/mapsme","followers_url":"https://api.github.com/users/mapsme/followers","following_url":"https://api.github.com/users/mapsme/following{/other_user}","gists_url":"https://api.github.com/users/mapsme/gists{/gist_id}","starred_url":"https://api.github.com/users/mapsme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapsme/subscriptions","organizations_url":"https://api.github.com/users/mapsme/orgs","repos_url":"https://api.github.com/users/mapsme/repos","events_url":"https://api.github.com/users/mapsme/events{/privacy}","received_events_url":"https://api.github.com/users/mapsme/received_events","type":"Organization","site_admin":false},"repo":{"id":42798033,"name":"omim","full_name":"mapsme/omim","owner":{"login":"mapsme","id":14185141,"avatar_url":"https://avatars.githubusercontent.com/u/14185141?v=3","gravatar_id":"","url":"https://api.github.com/users/mapsme","html_url":"https://github.com/mapsme","followers_url":"https://api.github.com/users/mapsme/followers","following_url":"https://api.github.com/users/mapsme/following{/other_user}","gists_url":"https://api.github.com/users/mapsme/gists{/gist_id}","starred_url":"https://api.github.com/users/mapsme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapsme/subscriptions","organizations_url":"https://api.github.com/users/mapsme/orgs","repos_url":"https://api.github.com/users/mapsme/repos","events_url":"https://api.github.com/users/mapsme/events{/privacy}","received_events_url":"https://api.github.com/users/mapsme/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mapsme/omim","description":"MAPS.ME - Offline OpenStreetMap maps for iOS/Android/Mac/Linux/Windows","fork":false,"url":"https://api.github.com/repos/mapsme/omim","forks_url":"https://api.github.com/repos/mapsme/omim/forks","keys_url":"https://api.github.com/repos/mapsme/omim/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mapsme/omim/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mapsme/omim/teams","hooks_url":"https://api.github.com/repos/mapsme/omim/hooks","issue_events_url":"https://api.github.com/repos/mapsme/omim/issues/events{/number}","events_url":"https://api.github.com/repos/mapsme/omim/events","assignees_url":"https://api.github.com/repos/mapsme/omim/assignees{/user}","branches_url":"https://api.github.com/repos/mapsme/omim/branches{/branch}","tags_url":"https://api.github.com/repos/mapsme/omim/tags","blobs_url":"https://api.github.com/repos/mapsme/omim/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mapsme/omim/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mapsme/omim/git/refs{/sha}","trees_url":"https://api.github.com/repos/mapsme/omim/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mapsme/omim/statuses/{sha}","languages_url":"https://api.github.com/repos/mapsme/omim/languages","stargazers_url":"https://api.github.com/repos/mapsme/omim/stargazers","contributors_url":"https://api.github.com/repos/mapsme/omim/contributors","subscribers_url":"https://api.github.com/repos/mapsme/omim/subscribers","subscription_url":"https://api.github.com/repos/mapsme/omim/subscription","commits_url":"https://api.github.com/repos/mapsme/omim/commits{/sha}","git_commits_url":"https://api.github.com/repos/mapsme/omim/git/commits{/sha}","comments_url":"https://api.github.com/repos/mapsme/omim/comments{/number}","issue_comment_url":"https://api.github.com/repos/mapsme/omim/issues/comments{/number}","contents_url":"https://api.github.com/repos/mapsme/omim/contents/{+path}","compare_url":"https://api.github.com/repos/mapsme/omim/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mapsme/omim/merges","archive_url":"https://api.github.com/repos/mapsme/omim/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mapsme/omim/downloads","issues_url":"https://api.github.com/repos/mapsme/omim/issues{/number}","pulls_url":"https://api.github.com/repos/mapsme/omim/pulls{/number}","milestones_url":"https://api.github.com/repos/mapsme/omim/milestones{/number}","notifications_url":"https://api.github.com/repos/mapsme/omim/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mapsme/omim/labels{/name}","releases_url":"https://api.github.com/repos/mapsme/omim/releases{/id}","deployments_url":"https://api.github.com/repos/mapsme/omim/deployments","created_at":"2015-09-20T02:57:13Z","updated_at":"2016-04-04T03:59:02Z","pushed_at":"2016-04-04T08:47:50Z","git_url":"git://github.com/mapsme/omim.git","ssh_url":"git@github.com:mapsme/omim.git","clone_url":"https://github.com/mapsme/omim.git","svn_url":"https://github.com/mapsme/omim","homepage":null,"size":2335038,"stargazers_count":1682,"watchers_count":1682,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":247,"mirror_url":null,"open_issues_count":125,"forks":247,"open_issues":125,"watchers":1682,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mapsme/omim/pulls/2704"},"html":{"href":"https://github.com/mapsme/omim/pull/2704"},"issue":{"href":"https://api.github.com/repos/mapsme/omim/issues/2704"},"comments":{"href":"https://api.github.com/repos/mapsme/omim/issues/2704/comments"},"review_comments":{"href":"https://api.github.com/repos/mapsme/omim/pulls/2704/comments"},"review_comment":{"href":"https://api.github.com/repos/mapsme/omim/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mapsme/omim/pulls/2704/commits"},"statuses":{"href":"https://api.github.com/repos/mapsme/omim/statuses/f4e9f87424a6fe02450ba8a16c795e04415722f4"}}}}