{"action":"created","comment":{"url":"https://api.github.com/repos/owncloud/core/pulls/comments/184812306","pull_request_review_id":116090161,"id":184812306,"diff_hunk":"@@ -888,18 +888,26 @@ protected function getFullPath($path) {\n \t}\n \n \t/**\n-\t * read first block of encrypted file, typically this will contain the\n+\t * Read first block of encrypted file from resource, typically this will contain the\n \t * encryption header\n \t *\n \t * @param string|resource $path\n \t * @return string\n \t */\n-\tprotected function readFirstBlock($path) {","path":"lib/private/Files/Storage/Wrapper/Encryption.php","position":11,"original_position":11,"commit_id":"f3eab9325347c11df4dc982d18f3eeacdca6bffa","original_commit_id":"f3eab9325347c11df4dc982d18f3eeacdca6bffa","user":{"login":"mrow4a","id":13368647,"avatar_url":"https://avatars2.githubusercontent.com/u/13368647?v=4","gravatar_id":"","url":"https://api.github.com/users/mrow4a","html_url":"https://github.com/mrow4a","followers_url":"https://api.github.com/users/mrow4a/followers","following_url":"https://api.github.com/users/mrow4a/following{/other_user}","gists_url":"https://api.github.com/users/mrow4a/gists{/gist_id}","starred_url":"https://api.github.com/users/mrow4a/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrow4a/subscriptions","organizations_url":"https://api.github.com/users/mrow4a/orgs","repos_url":"https://api.github.com/users/mrow4a/repos","events_url":"https://api.github.com/users/mrow4a/events{/privacy}","received_events_url":"https://api.github.com/users/mrow4a/received_events","type":"User","site_admin":false},"body":"readFirstBlock was generalized for resource and storage -> I created dedicated functions, readResourceFirstBlock and readStorageFirstBlock. ","created_at":"2018-04-27T21:35:03Z","updated_at":"2018-04-27T21:35:03Z","html_url":"https://github.com/owncloud/core/pull/31299#discussion_r184812306","pull_request_url":"https://api.github.com/repos/owncloud/core/pulls/31299","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/owncloud/core/pulls/comments/184812306"},"html":{"href":"https://github.com/owncloud/core/pull/31299#discussion_r184812306"},"pull_request":{"href":"https://api.github.com/repos/owncloud/core/pulls/31299"}}},"pull_request":{"url":"https://api.github.com/repos/owncloud/core/pulls/31299","id":184732766,"html_url":"https://github.com/owncloud/core/pull/31299","diff_url":"https://github.com/owncloud/core/pull/31299.diff","patch_url":"https://github.com/owncloud/core/pull/31299.patch","issue_url":"https://api.github.com/repos/owncloud/core/issues/31299","number":31299,"state":"open","locked":false,"title":"Don't check for existence twice if we know it is not a part file (objectstorage only)","user":{"login":"mrow4a","id":13368647,"avatar_url":"https://avatars2.githubusercontent.com/u/13368647?v=4","gravatar_id":"","url":"https://api.github.com/users/mrow4a","html_url":"https://github.com/mrow4a","followers_url":"https://api.github.com/users/mrow4a/followers","following_url":"https://api.github.com/users/mrow4a/following{/other_user}","gists_url":"https://api.github.com/users/mrow4a/gists{/gist_id}","starred_url":"https://api.github.com/users/mrow4a/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrow4a/subscriptions","organizations_url":"https://api.github.com/users/mrow4a/orgs","repos_url":"https://api.github.com/users/mrow4a/repos","events_url":"https://api.github.com/users/mrow4a/events{/privacy}","received_events_url":"https://api.github.com/users/mrow4a/received_events","type":"User","site_admin":false},"body":"Don't check for existence in the storage (e.g. objectstorage) twice if we know it is not a part file. \r\n\r\nIn that section of the code, we were checking for file existence in the storage twice for the same path if this is not a part file. In case of part file we indeed need to check twice, but otherwise not. \r\n\r\nObjectstorage is affected, since call to \"is_resource\" returns false. ","created_at":"2018-04-27T21:32:13Z","updated_at":"2018-04-27T21:35:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c3d5c31a4e11c04bd4a2fb16c9aef72feadb9c44","assignee":null,"assignees":[],"requested_reviewers":[{"login":"PVince81","id":277525,"avatar_url":"https://avatars2.githubusercontent.com/u/277525?v=4","gravatar_id":"","url":"https://api.github.com/users/PVince81","html_url":"https://github.com/PVince81","followers_url":"https://api.github.com/users/PVince81/followers","following_url":"https://api.github.com/users/PVince81/following{/other_user}","gists_url":"https://api.github.com/users/PVince81/gists{/gist_id}","starred_url":"https://api.github.com/users/PVince81/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PVince81/subscriptions","organizations_url":"https://api.github.com/users/PVince81/orgs","repos_url":"https://api.github.com/users/PVince81/repos","events_url":"https://api.github.com/users/PVince81/events{/privacy}","received_events_url":"https://api.github.com/users/PVince81/received_events","type":"User","site_admin":false},{"login":"butonic","id":956847,"avatar_url":"https://avatars0.githubusercontent.com/u/956847?v=4","gravatar_id":"","url":"https://api.github.com/users/butonic","html_url":"https://github.com/butonic","followers_url":"https://api.github.com/users/butonic/followers","following_url":"https://api.github.com/users/butonic/following{/other_user}","gists_url":"https://api.github.com/users/butonic/gists{/gist_id}","starred_url":"https://api.github.com/users/butonic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/butonic/subscriptions","organizations_url":"https://api.github.com/users/butonic/orgs","repos_url":"https://api.github.com/users/butonic/repos","events_url":"https://api.github.com/users/butonic/events{/privacy}","received_events_url":"https://api.github.com/users/butonic/received_events","type":"User","site_admin":false},{"login":"DeepDiver1975","id":1005065,"avatar_url":"https://avatars2.githubusercontent.com/u/1005065?v=4","gravatar_id":"","url":"https://api.github.com/users/DeepDiver1975","html_url":"https://github.com/DeepDiver1975","followers_url":"https://api.github.com/users/DeepDiver1975/followers","following_url":"https://api.github.com/users/DeepDiver1975/following{/other_user}","gists_url":"https://api.github.com/users/DeepDiver1975/gists{/gist_id}","starred_url":"https://api.github.com/users/DeepDiver1975/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DeepDiver1975/subscriptions","organizations_url":"https://api.github.com/users/DeepDiver1975/orgs","repos_url":"https://api.github.com/users/DeepDiver1975/repos","events_url":"https://api.github.com/users/DeepDiver1975/events{/privacy}","received_events_url":"https://api.github.com/users/DeepDiver1975/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/owncloud/core/pulls/31299/commits","review_comments_url":"https://api.github.com/repos/owncloud/core/pulls/31299/comments","review_comment_url":"https://api.github.com/repos/owncloud/core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/owncloud/core/issues/31299/comments","statuses_url":"https://api.github.com/repos/owncloud/core/statuses/f3eab9325347c11df4dc982d18f3eeacdca6bffa","head":{"label":"owncloud:optimize_put_6","ref":"optimize_put_6","sha":"f3eab9325347c11df4dc982d18f3eeacdca6bffa","user":{"login":"owncloud","id":1645051,"avatar_url":"https://avatars3.githubusercontent.com/u/1645051?v=4","gravatar_id":"","url":"https://api.github.com/users/owncloud","html_url":"https://github.com/owncloud","followers_url":"https://api.github.com/users/owncloud/followers","following_url":"https://api.github.com/users/owncloud/following{/other_user}","gists_url":"https://api.github.com/users/owncloud/gists{/gist_id}","starred_url":"https://api.github.com/users/owncloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/owncloud/subscriptions","organizations_url":"https://api.github.com/users/owncloud/orgs","repos_url":"https://api.github.com/users/owncloud/repos","events_url":"https://api.github.com/users/owncloud/events{/privacy}","received_events_url":"https://api.github.com/users/owncloud/received_events","type":"Organization","site_admin":false},"repo":{"id":5550552,"name":"core","full_name":"owncloud/core","owner":{"login":"owncloud","id":1645051,"avatar_url":"https://avatars3.githubusercontent.com/u/1645051?v=4","gravatar_id":"","url":"https://api.github.com/users/owncloud","html_url":"https://github.com/owncloud","followers_url":"https://api.github.com/users/owncloud/followers","following_url":"https://api.github.com/users/owncloud/following{/other_user}","gists_url":"https://api.github.com/users/owncloud/gists{/gist_id}","starred_url":"https://api.github.com/users/owncloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/owncloud/subscriptions","organizations_url":"https://api.github.com/users/owncloud/orgs","repos_url":"https://api.github.com/users/owncloud/repos","events_url":"https://api.github.com/users/owncloud/events{/privacy}","received_events_url":"https://api.github.com/users/owncloud/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/owncloud/core","description":":cloud: ownCloud web server core (Files, DAV, etc.)","fork":false,"url":"https://api.github.com/repos/owncloud/core","forks_url":"https://api.github.com/repos/owncloud/core/forks","keys_url":"https://api.github.com/repos/owncloud/core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/owncloud/core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/owncloud/core/teams","hooks_url":"https://api.github.com/repos/owncloud/core/hooks","issue_events_url":"https://api.github.com/repos/owncloud/core/issues/events{/number}","events_url":"https://api.github.com/repos/owncloud/core/events","assignees_url":"https://api.github.com/repos/owncloud/core/assignees{/user}","branches_url":"https://api.github.com/repos/owncloud/core/branches{/branch}","tags_url":"https://api.github.com/repos/owncloud/core/tags","blobs_url":"https://api.github.com/repos/owncloud/core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/owncloud/core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/owncloud/core/git/refs{/sha}","trees_url":"https://api.github.com/repos/owncloud/core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/owncloud/core/statuses/{sha}","languages_url":"https://api.github.com/repos/owncloud/core/languages","stargazers_url":"https://api.github.com/repos/owncloud/core/stargazers","contributors_url":"https://api.github.com/repos/owncloud/core/contributors","subscribers_url":"https://api.github.com/repos/owncloud/core/subscribers","subscription_url":"https://api.github.com/repos/owncloud/core/subscription","commits_url":"https://api.github.com/repos/owncloud/core/commits{/sha}","git_commits_url":"https://api.github.com/repos/owncloud/core/git/commits{/sha}","comments_url":"https://api.github.com/repos/owncloud/core/comments{/number}","issue_comment_url":"https://api.github.com/repos/owncloud/core/issues/comments{/number}","contents_url":"https://api.github.com/repos/owncloud/core/contents/{+path}","compare_url":"https://api.github.com/repos/owncloud/core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/owncloud/core/merges","archive_url":"https://api.github.com/repos/owncloud/core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/owncloud/core/downloads","issues_url":"https://api.github.com/repos/owncloud/core/issues{/number}","pulls_url":"https://api.github.com/repos/owncloud/core/pulls{/number}","milestones_url":"https://api.github.com/repos/owncloud/core/milestones{/number}","notifications_url":"https://api.github.com/repos/owncloud/core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/owncloud/core/labels{/name}","releases_url":"https://api.github.com/repos/owncloud/core/releases{/id}","deployments_url":"https://api.github.com/repos/owncloud/core/deployments","created_at":"2012-08-25T10:32:48Z","updated_at":"2018-04-27T19:52:45Z","pushed_at":"2018-04-27T21:32:13Z","git_url":"git://github.com/owncloud/core.git","ssh_url":"git@github.com:owncloud/core.git","clone_url":"https://github.com/owncloud/core.git","svn_url":"https://github.com/owncloud/core","homepage":"https://owncloud.org/","size":236822,"stargazers_count":5967,"watchers_count":5967,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1800,"mirror_url":null,"archived":false,"open_issues_count":1190,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":1800,"open_issues":1190,"watchers":5967,"default_branch":"master"}},"base":{"label":"owncloud:master","ref":"master","sha":"2d02ba8ae27293c8184c7e4fcbeb22b13af46a83","user":{"login":"owncloud","id":1645051,"avatar_url":"https://avatars3.githubusercontent.com/u/1645051?v=4","gravatar_id":"","url":"https://api.github.com/users/owncloud","html_url":"https://github.com/owncloud","followers_url":"https://api.github.com/users/owncloud/followers","following_url":"https://api.github.com/users/owncloud/following{/other_user}","gists_url":"https://api.github.com/users/owncloud/gists{/gist_id}","starred_url":"https://api.github.com/users/owncloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/owncloud/subscriptions","organizations_url":"https://api.github.com/users/owncloud/orgs","repos_url":"https://api.github.com/users/owncloud/repos","events_url":"https://api.github.com/users/owncloud/events{/privacy}","received_events_url":"https://api.github.com/users/owncloud/received_events","type":"Organization","site_admin":false},"repo":{"id":5550552,"name":"core","full_name":"owncloud/core","owner":{"login":"owncloud","id":1645051,"avatar_url":"https://avatars3.githubusercontent.com/u/1645051?v=4","gravatar_id":"","url":"https://api.github.com/users/owncloud","html_url":"https://github.com/owncloud","followers_url":"https://api.github.com/users/owncloud/followers","following_url":"https://api.github.com/users/owncloud/following{/other_user}","gists_url":"https://api.github.com/users/owncloud/gists{/gist_id}","starred_url":"https://api.github.com/users/owncloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/owncloud/subscriptions","organizations_url":"https://api.github.com/users/owncloud/orgs","repos_url":"https://api.github.com/users/owncloud/repos","events_url":"https://api.github.com/users/owncloud/events{/privacy}","received_events_url":"https://api.github.com/users/owncloud/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/owncloud/core","description":":cloud: ownCloud web server core (Files, DAV, etc.)","fork":false,"url":"https://api.github.com/repos/owncloud/core","forks_url":"https://api.github.com/repos/owncloud/core/forks","keys_url":"https://api.github.com/repos/owncloud/core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/owncloud/core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/owncloud/core/teams","hooks_url":"https://api.github.com/repos/owncloud/core/hooks","issue_events_url":"https://api.github.com/repos/owncloud/core/issues/events{/number}","events_url":"https://api.github.com/repos/owncloud/core/events","assignees_url":"https://api.github.com/repos/owncloud/core/assignees{/user}","branches_url":"https://api.github.com/repos/owncloud/core/branches{/branch}","tags_url":"https://api.github.com/repos/owncloud/core/tags","blobs_url":"https://api.github.com/repos/owncloud/core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/owncloud/core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/owncloud/core/git/refs{/sha}","trees_url":"https://api.github.com/repos/owncloud/core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/owncloud/core/statuses/{sha}","languages_url":"https://api.github.com/repos/owncloud/core/languages","stargazers_url":"https://api.github.com/repos/owncloud/core/stargazers","contributors_url":"https://api.github.com/repos/owncloud/core/contributors","subscribers_url":"https://api.github.com/repos/owncloud/core/subscribers","subscription_url":"https://api.github.com/repos/owncloud/core/subscription","commits_url":"https://api.github.com/repos/owncloud/core/commits{/sha}","git_commits_url":"https://api.github.com/repos/owncloud/core/git/commits{/sha}","comments_url":"https://api.github.com/repos/owncloud/core/comments{/number}","issue_comment_url":"https://api.github.com/repos/owncloud/core/issues/comments{/number}","contents_url":"https://api.github.com/repos/owncloud/core/contents/{+path}","compare_url":"https://api.github.com/repos/owncloud/core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/owncloud/core/merges","archive_url":"https://api.github.com/repos/owncloud/core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/owncloud/core/downloads","issues_url":"https://api.github.com/repos/owncloud/core/issues{/number}","pulls_url":"https://api.github.com/repos/owncloud/core/pulls{/number}","milestones_url":"https://api.github.com/repos/owncloud/core/milestones{/number}","notifications_url":"https://api.github.com/repos/owncloud/core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/owncloud/core/labels{/name}","releases_url":"https://api.github.com/repos/owncloud/core/releases{/id}","deployments_url":"https://api.github.com/repos/owncloud/core/deployments","created_at":"2012-08-25T10:32:48Z","updated_at":"2018-04-27T19:52:45Z","pushed_at":"2018-04-27T21:32:13Z","git_url":"git://github.com/owncloud/core.git","ssh_url":"git@github.com:owncloud/core.git","clone_url":"https://github.com/owncloud/core.git","svn_url":"https://github.com/owncloud/core","homepage":"https://owncloud.org/","size":236822,"stargazers_count":5967,"watchers_count":5967,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1800,"mirror_url":null,"archived":false,"open_issues_count":1190,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":1800,"open_issues":1190,"watchers":5967,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/owncloud/core/pulls/31299"},"html":{"href":"https://github.com/owncloud/core/pull/31299"},"issue":{"href":"https://api.github.com/repos/owncloud/core/issues/31299"},"comments":{"href":"https://api.github.com/repos/owncloud/core/issues/31299/comments"},"review_comments":{"href":"https://api.github.com/repos/owncloud/core/pulls/31299/comments"},"review_comment":{"href":"https://api.github.com/repos/owncloud/core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/owncloud/core/pulls/31299/commits"},"statuses":{"href":"https://api.github.com/repos/owncloud/core/statuses/f3eab9325347c11df4dc982d18f3eeacdca6bffa"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"mrow4a"}}