{"action":"created","comment":{"url":"https://api.github.com/repos/cozy/cozy-files-v3/pulls/comments/100324443","pull_request_review_id":21028007,"id":100324443,"diff_hunk":"@@ -212,8 +206,13 @@ export const downloadSelection = () => {\n   return async (dispatch, getState) => {\n     const { selected } = getState().ui\n     dispatch({ type: DOWNLOAD_SELECTION, selected })\n-    selected.forEach(id => dispatch(toggleFileSelection(id, true)))\n-    return downloadFile(selected[0])\n+    if (selected.length === 1 && getFileById(getState().files, selected[0]).type !== 'directory') {\n+      return dispatch(downloadFile(selected[0]))\n+    }\n+    const paths = getFilePaths(getState(), selected)\n+    const href = await cozy.files.getArchiveLink(paths)\n+    const fullpath = await cozy.fullpath(href)\n+    forceFileDownload(fullpath, 'files.zip')","path":"src/actions/index.js","position":55,"original_position":55,"commit_id":"e1810e7e1d64a4fba7d2f9eb9788d8214b078abb","original_commit_id":"e1810e7e1d64a4fba7d2f9eb9788d8214b078abb","user":{"login":"goldoraf","id":5461,"avatar_url":"https://avatars.githubusercontent.com/u/5461?v=3","gravatar_id":"","url":"https://api.github.com/users/goldoraf","html_url":"https://github.com/goldoraf","followers_url":"https://api.github.com/users/goldoraf/followers","following_url":"https://api.github.com/users/goldoraf/following{/other_user}","gists_url":"https://api.github.com/users/goldoraf/gists{/gist_id}","starred_url":"https://api.github.com/users/goldoraf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/goldoraf/subscriptions","organizations_url":"https://api.github.com/users/goldoraf/orgs","repos_url":"https://api.github.com/users/goldoraf/repos","events_url":"https://api.github.com/users/goldoraf/events{/privacy}","received_events_url":"https://api.github.com/users/goldoraf/received_events","type":"User","site_admin":false},"body":"I don't think so... Maybe later, let's see what our POs think about that ;)","created_at":"2017-02-09T15:01:30Z","updated_at":"2017-02-09T15:01:30Z","html_url":"https://github.com/cozy/cozy-files-v3/pull/89#discussion_r100324443","pull_request_url":"https://api.github.com/repos/cozy/cozy-files-v3/pulls/89","_links":{"self":{"href":"https://api.github.com/repos/cozy/cozy-files-v3/pulls/comments/100324443"},"html":{"href":"https://github.com/cozy/cozy-files-v3/pull/89#discussion_r100324443"},"pull_request":{"href":"https://api.github.com/repos/cozy/cozy-files-v3/pulls/89"}}},"pull_request":{"url":"https://api.github.com/repos/cozy/cozy-files-v3/pulls/89","id":105428123,"html_url":"https://github.com/cozy/cozy-files-v3/pull/89","diff_url":"https://github.com/cozy/cozy-files-v3/pull/89.diff","patch_url":"https://github.com/cozy/cozy-files-v3/pull/89.patch","issue_url":"https://api.github.com/repos/cozy/cozy-files-v3/issues/89","number":89,"state":"open","locked":false,"title":"Archive download & other things","user":{"login":"goldoraf","id":5461,"avatar_url":"https://avatars.githubusercontent.com/u/5461?v=3","gravatar_id":"","url":"https://api.github.com/users/goldoraf","html_url":"https://github.com/goldoraf","followers_url":"https://api.github.com/users/goldoraf/followers","following_url":"https://api.github.com/users/goldoraf/following{/other_user}","gists_url":"https://api.github.com/users/goldoraf/gists{/gist_id}","starred_url":"https://api.github.com/users/goldoraf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/goldoraf/subscriptions","organizations_url":"https://api.github.com/users/goldoraf/orgs","repos_url":"https://api.github.com/users/goldoraf/repos","events_url":"https://api.github.com/users/goldoraf/events{/privacy}","received_events_url":"https://api.github.com/users/goldoraf/received_events","type":"User","site_admin":false},"body":"This PR:\r\n\r\n- adds the download of a selection of files as an archive\r\n- fixes the missing manifest.webapp requested by the stack\r\n- fixes the error related to bosonic's menu\r\n","created_at":"2017-02-09T13:35:58Z","updated_at":"2017-02-09T15:01:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"882a6e5dc841e27fa8647c08d62ad7928ae95ce9","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/cozy/cozy-files-v3/pulls/89/commits","review_comments_url":"https://api.github.com/repos/cozy/cozy-files-v3/pulls/89/comments","review_comment_url":"https://api.github.com/repos/cozy/cozy-files-v3/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cozy/cozy-files-v3/issues/89/comments","statuses_url":"https://api.github.com/repos/cozy/cozy-files-v3/statuses/e1810e7e1d64a4fba7d2f9eb9788d8214b078abb","head":{"label":"goldoraf:archive_download","ref":"archive_download","sha":"e1810e7e1d64a4fba7d2f9eb9788d8214b078abb","user":{"login":"goldoraf","id":5461,"avatar_url":"https://avatars.githubusercontent.com/u/5461?v=3","gravatar_id":"","url":"https://api.github.com/users/goldoraf","html_url":"https://github.com/goldoraf","followers_url":"https://api.github.com/users/goldoraf/followers","following_url":"https://api.github.com/users/goldoraf/following{/other_user}","gists_url":"https://api.github.com/users/goldoraf/gists{/gist_id}","starred_url":"https://api.github.com/users/goldoraf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/goldoraf/subscriptions","organizations_url":"https://api.github.com/users/goldoraf/orgs","repos_url":"https://api.github.com/users/goldoraf/repos","events_url":"https://api.github.com/users/goldoraf/events{/privacy}","received_events_url":"https://api.github.com/users/goldoraf/received_events","type":"User","site_admin":false},"repo":{"id":77270469,"name":"cozy-files-v3","full_name":"goldoraf/cozy-files-v3","owner":{"login":"goldoraf","id":5461,"avatar_url":"https://avatars.githubusercontent.com/u/5461?v=3","gravatar_id":"","url":"https://api.github.com/users/goldoraf","html_url":"https://github.com/goldoraf","followers_url":"https://api.github.com/users/goldoraf/followers","following_url":"https://api.github.com/users/goldoraf/following{/other_user}","gists_url":"https://api.github.com/users/goldoraf/gists{/gist_id}","starred_url":"https://api.github.com/users/goldoraf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/goldoraf/subscriptions","organizations_url":"https://api.github.com/users/goldoraf/orgs","repos_url":"https://api.github.com/users/goldoraf/repos","events_url":"https://api.github.com/users/goldoraf/events{/privacy}","received_events_url":"https://api.github.com/users/goldoraf/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/goldoraf/cozy-files-v3","description":"Cozy Files app for Cozy Cloud","fork":true,"url":"https://api.github.com/repos/goldoraf/cozy-files-v3","forks_url":"https://api.github.com/repos/goldoraf/cozy-files-v3/forks","keys_url":"https://api.github.com/repos/goldoraf/cozy-files-v3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/goldoraf/cozy-files-v3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/goldoraf/cozy-files-v3/teams","hooks_url":"https://api.github.com/repos/goldoraf/cozy-files-v3/hooks","issue_events_url":"https://api.github.com/repos/goldoraf/cozy-files-v3/issues/events{/number}","events_url":"https://api.github.com/repos/goldoraf/cozy-files-v3/events","assignees_url":"https://api.github.com/repos/goldoraf/cozy-files-v3/assignees{/user}","branches_url":"https://api.github.com/repos/goldoraf/cozy-files-v3/branches{/branch}","tags_url":"https://api.github.com/repos/goldoraf/cozy-files-v3/tags","blobs_url":"https://api.github.com/repos/goldoraf/cozy-files-v3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/goldoraf/cozy-files-v3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/goldoraf/cozy-files-v3/git/refs{/sha}","trees_url":"https://api.github.com/repos/goldoraf/cozy-files-v3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/goldoraf/cozy-files-v3/statuses/{sha}","languages_url":"https://api.github.com/repos/goldoraf/cozy-files-v3/languages","stargazers_url":"https://api.github.com/repos/goldoraf/cozy-files-v3/stargazers","contributors_url":"https://api.github.com/repos/goldoraf/cozy-files-v3/contributors","subscribers_url":"https://api.github.com/repos/goldoraf/cozy-files-v3/subscribers","subscription_url":"https://api.github.com/repos/goldoraf/cozy-files-v3/subscription","commits_url":"https://api.github.com/repos/goldoraf/cozy-files-v3/commits{/sha}","git_commits_url":"https://api.github.com/repos/goldoraf/cozy-files-v3/git/commits{/sha}","comments_url":"https://api.github.com/repos/goldoraf/cozy-files-v3/comments{/number}","issue_comment_url":"https://api.github.com/repos/goldoraf/cozy-files-v3/issues/comments{/number}","contents_url":"https://api.github.com/repos/goldoraf/cozy-files-v3/contents/{+path}","compare_url":"https://api.github.com/repos/goldoraf/cozy-files-v3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/goldoraf/cozy-files-v3/merges","archive_url":"https://api.github.com/repos/goldoraf/cozy-files-v3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/goldoraf/cozy-files-v3/downloads","issues_url":"https://api.github.com/repos/goldoraf/cozy-files-v3/issues{/number}","pulls_url":"https://api.github.com/repos/goldoraf/cozy-files-v3/pulls{/number}","milestones_url":"https://api.github.com/repos/goldoraf/cozy-files-v3/milestones{/number}","notifications_url":"https://api.github.com/repos/goldoraf/cozy-files-v3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/goldoraf/cozy-files-v3/labels{/name}","releases_url":"https://api.github.com/repos/goldoraf/cozy-files-v3/releases{/id}","deployments_url":"https://api.github.com/repos/goldoraf/cozy-files-v3/deployments","created_at":"2016-12-24T06:53:22Z","updated_at":"2016-12-24T06:53:25Z","pushed_at":"2017-02-09T14:51:12Z","git_url":"git://github.com/goldoraf/cozy-files-v3.git","ssh_url":"git@github.com:goldoraf/cozy-files-v3.git","clone_url":"https://github.com/goldoraf/cozy-files-v3.git","svn_url":"https://github.com/goldoraf/cozy-files-v3","homepage":null,"size":1062,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"cozy:master","ref":"master","sha":"cca1dbe41a4e1b43e4736c64de46347a88d445d7","user":{"login":"cozy","id":7690525,"avatar_url":"https://avatars.githubusercontent.com/u/7690525?v=3","gravatar_id":"","url":"https://api.github.com/users/cozy","html_url":"https://github.com/cozy","followers_url":"https://api.github.com/users/cozy/followers","following_url":"https://api.github.com/users/cozy/following{/other_user}","gists_url":"https://api.github.com/users/cozy/gists{/gist_id}","starred_url":"https://api.github.com/users/cozy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cozy/subscriptions","organizations_url":"https://api.github.com/users/cozy/orgs","repos_url":"https://api.github.com/users/cozy/repos","events_url":"https://api.github.com/users/cozy/events{/privacy}","received_events_url":"https://api.github.com/users/cozy/received_events","type":"Organization","site_admin":false},"repo":{"id":76205055,"name":"cozy-files-v3","full_name":"cozy/cozy-files-v3","owner":{"login":"cozy","id":7690525,"avatar_url":"https://avatars.githubusercontent.com/u/7690525?v=3","gravatar_id":"","url":"https://api.github.com/users/cozy","html_url":"https://github.com/cozy","followers_url":"https://api.github.com/users/cozy/followers","following_url":"https://api.github.com/users/cozy/following{/other_user}","gists_url":"https://api.github.com/users/cozy/gists{/gist_id}","starred_url":"https://api.github.com/users/cozy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cozy/subscriptions","organizations_url":"https://api.github.com/users/cozy/orgs","repos_url":"https://api.github.com/users/cozy/repos","events_url":"https://api.github.com/users/cozy/events{/privacy}","received_events_url":"https://api.github.com/users/cozy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cozy/cozy-files-v3","description":"Cozy Files app for Cozy Cloud","fork":false,"url":"https://api.github.com/repos/cozy/cozy-files-v3","forks_url":"https://api.github.com/repos/cozy/cozy-files-v3/forks","keys_url":"https://api.github.com/repos/cozy/cozy-files-v3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cozy/cozy-files-v3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cozy/cozy-files-v3/teams","hooks_url":"https://api.github.com/repos/cozy/cozy-files-v3/hooks","issue_events_url":"https://api.github.com/repos/cozy/cozy-files-v3/issues/events{/number}","events_url":"https://api.github.com/repos/cozy/cozy-files-v3/events","assignees_url":"https://api.github.com/repos/cozy/cozy-files-v3/assignees{/user}","branches_url":"https://api.github.com/repos/cozy/cozy-files-v3/branches{/branch}","tags_url":"https://api.github.com/repos/cozy/cozy-files-v3/tags","blobs_url":"https://api.github.com/repos/cozy/cozy-files-v3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cozy/cozy-files-v3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cozy/cozy-files-v3/git/refs{/sha}","trees_url":"https://api.github.com/repos/cozy/cozy-files-v3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cozy/cozy-files-v3/statuses/{sha}","languages_url":"https://api.github.com/repos/cozy/cozy-files-v3/languages","stargazers_url":"https://api.github.com/repos/cozy/cozy-files-v3/stargazers","contributors_url":"https://api.github.com/repos/cozy/cozy-files-v3/contributors","subscribers_url":"https://api.github.com/repos/cozy/cozy-files-v3/subscribers","subscription_url":"https://api.github.com/repos/cozy/cozy-files-v3/subscription","commits_url":"https://api.github.com/repos/cozy/cozy-files-v3/commits{/sha}","git_commits_url":"https://api.github.com/repos/cozy/cozy-files-v3/git/commits{/sha}","comments_url":"https://api.github.com/repos/cozy/cozy-files-v3/comments{/number}","issue_comment_url":"https://api.github.com/repos/cozy/cozy-files-v3/issues/comments{/number}","contents_url":"https://api.github.com/repos/cozy/cozy-files-v3/contents/{+path}","compare_url":"https://api.github.com/repos/cozy/cozy-files-v3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cozy/cozy-files-v3/merges","archive_url":"https://api.github.com/repos/cozy/cozy-files-v3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cozy/cozy-files-v3/downloads","issues_url":"https://api.github.com/repos/cozy/cozy-files-v3/issues{/number}","pulls_url":"https://api.github.com/repos/cozy/cozy-files-v3/pulls{/number}","milestones_url":"https://api.github.com/repos/cozy/cozy-files-v3/milestones{/number}","notifications_url":"https://api.github.com/repos/cozy/cozy-files-v3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cozy/cozy-files-v3/labels{/name}","releases_url":"https://api.github.com/repos/cozy/cozy-files-v3/releases{/id}","deployments_url":"https://api.github.com/repos/cozy/cozy-files-v3/deployments","created_at":"2016-12-11T22:51:29Z","updated_at":"2017-01-29T23:31:52Z","pushed_at":"2017-02-09T14:51:13Z","git_url":"git://github.com/cozy/cozy-files-v3.git","ssh_url":"git@github.com:cozy/cozy-files-v3.git","clone_url":"https://github.com/cozy/cozy-files-v3.git","svn_url":"https://github.com/cozy/cozy-files-v3","homepage":null,"size":5318,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":3,"forks":12,"open_issues":3,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cozy/cozy-files-v3/pulls/89"},"html":{"href":"https://github.com/cozy/cozy-files-v3/pull/89"},"issue":{"href":"https://api.github.com/repos/cozy/cozy-files-v3/issues/89"},"comments":{"href":"https://api.github.com/repos/cozy/cozy-files-v3/issues/89/comments"},"review_comments":{"href":"https://api.github.com/repos/cozy/cozy-files-v3/pulls/89/comments"},"review_comment":{"href":"https://api.github.com/repos/cozy/cozy-files-v3/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cozy/cozy-files-v3/pulls/89/commits"},"statuses":{"href":"https://api.github.com/repos/cozy/cozy-files-v3/statuses/e1810e7e1d64a4fba7d2f9eb9788d8214b078abb"}}}}
{"actor":{"display_login":"goldoraf"}}