{"action":"created","comment":{"url":"https://api.github.com/repos/aodn/data-services/pulls/comments/60007097","id":60007097,"diff_hunk":"@@ -71,14 +71,25 @@ main() {\n \n     local tmp_dir=`mktemp -d`\n     chmod a+rx $tmp_dir\n-    unzip -q -u -o $file -d $tmp_dir || file_error \"Error unzipping\"\n+    local tmp_zip_manifest=`mktemp`\n+\n+    unzip_file $file $tmp_dir $tmp_zip_manifest\n+    if [ $? -ne 0 ]; then\n+        rm -rf --preserve-root $tmp_dir\n+        file_error \"Error unzipping\"\n+    fi\n \n     local nc_file\n-    nc_file=`find $tmp_dir -name \"*.nc\" | head -1` || file_error \"Cannot find NetCDF file in zip bundle\"\n+    nc_file=`grep \".*.nc\" $tmp_zip_manifest | head -1`\n+    if [ $? -ne 0 ]; then\n+        rm -rf --preserve-root $tmp_dir","path":"SOOP/SOOP_BA/incoming_handler.sh","position":17,"original_position":17,"commit_id":"638d25b12d56c0f6ea7b6c03052aeec9729bd46c","original_commit_id":"638d25b12d56c0f6ea7b6c03052aeec9729bd46c","user":{"login":"lbesnard","id":2382814,"avatar_url":"https://avatars.githubusercontent.com/u/2382814?v=3","gravatar_id":"","url":"https://api.github.com/users/lbesnard","html_url":"https://github.com/lbesnard","followers_url":"https://api.github.com/users/lbesnard/followers","following_url":"https://api.github.com/users/lbesnard/following{/other_user}","gists_url":"https://api.github.com/users/lbesnard/gists{/gist_id}","starred_url":"https://api.github.com/users/lbesnard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lbesnard/subscriptions","organizations_url":"https://api.github.com/users/lbesnard/orgs","repos_url":"https://api.github.com/users/lbesnard/repos","events_url":"https://api.github.com/users/lbesnard/events{/privacy}","received_events_url":"https://api.github.com/users/lbesnard/received_events","type":"User","site_admin":false},"body":"same here","created_at":"2016-04-18T05:26:50Z","updated_at":"2016-04-18T05:26:50Z","html_url":"https://github.com/aodn/data-services/pull/418#discussion_r60007097","pull_request_url":"https://api.github.com/repos/aodn/data-services/pulls/418","_links":{"self":{"href":"https://api.github.com/repos/aodn/data-services/pulls/comments/60007097"},"html":{"href":"https://github.com/aodn/data-services/pull/418#discussion_r60007097"},"pull_request":{"href":"https://api.github.com/repos/aodn/data-services/pulls/418"}}},"pull_request":{"url":"https://api.github.com/repos/aodn/data-services/pulls/418","id":66798937,"html_url":"https://github.com/aodn/data-services/pull/418","diff_url":"https://github.com/aodn/data-services/pull/418.diff","patch_url":"https://github.com/aodn/data-services/pull/418.patch","issue_url":"https://api.github.com/repos/aodn/data-services/issues/418","number":418,"state":"open","locked":false,"title":"SOOP_BA remove cleanup tmp dir when error during processing zip","user":{"login":"bpasquer","id":3733612,"avatar_url":"https://avatars.githubusercontent.com/u/3733612?v=3","gravatar_id":"","url":"https://api.github.com/users/bpasquer","html_url":"https://github.com/bpasquer","followers_url":"https://api.github.com/users/bpasquer/followers","following_url":"https://api.github.com/users/bpasquer/following{/other_user}","gists_url":"https://api.github.com/users/bpasquer/gists{/gist_id}","starred_url":"https://api.github.com/users/bpasquer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bpasquer/subscriptions","organizations_url":"https://api.github.com/users/bpasquer/orgs","repos_url":"https://api.github.com/users/bpasquer/repos","events_url":"https://api.github.com/users/bpasquer/events{/privacy}","received_events_url":"https://api.github.com/users/bpasquer/received_events","type":"User","site_admin":false},"body":"@lbesnard  another bit of code to fix https://github.com/aodn/data-services/issues/395#issuecomment-211175218","created_at":"2016-04-18T04:57:57Z","updated_at":"2016-04-18T05:26:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d2644f06f5477514fe61fea32efcb904c0dd6993","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/aodn/data-services/pulls/418/commits","review_comments_url":"https://api.github.com/repos/aodn/data-services/pulls/418/comments","review_comment_url":"https://api.github.com/repos/aodn/data-services/pulls/comments{/number}","comments_url":"https://api.github.com/repos/aodn/data-services/issues/418/comments","statuses_url":"https://api.github.com/repos/aodn/data-services/statuses/638d25b12d56c0f6ea7b6c03052aeec9729bd46c","head":{"label":"aodn:soop_ba_rmdir","ref":"soop_ba_rmdir","sha":"638d25b12d56c0f6ea7b6c03052aeec9729bd46c","user":{"login":"aodn","id":2802166,"avatar_url":"https://avatars.githubusercontent.com/u/2802166?v=3","gravatar_id":"","url":"https://api.github.com/users/aodn","html_url":"https://github.com/aodn","followers_url":"https://api.github.com/users/aodn/followers","following_url":"https://api.github.com/users/aodn/following{/other_user}","gists_url":"https://api.github.com/users/aodn/gists{/gist_id}","starred_url":"https://api.github.com/users/aodn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aodn/subscriptions","organizations_url":"https://api.github.com/users/aodn/orgs","repos_url":"https://api.github.com/users/aodn/repos","events_url":"https://api.github.com/users/aodn/events{/privacy}","received_events_url":"https://api.github.com/users/aodn/received_events","type":"Organization","site_admin":false},"repo":{"id":17236639,"name":"data-services","full_name":"aodn/data-services","owner":{"login":"aodn","id":2802166,"avatar_url":"https://avatars.githubusercontent.com/u/2802166?v=3","gravatar_id":"","url":"https://api.github.com/users/aodn","html_url":"https://github.com/aodn","followers_url":"https://api.github.com/users/aodn/followers","following_url":"https://api.github.com/users/aodn/following{/other_user}","gists_url":"https://api.github.com/users/aodn/gists{/gist_id}","starred_url":"https://api.github.com/users/aodn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aodn/subscriptions","organizations_url":"https://api.github.com/users/aodn/orgs","repos_url":"https://api.github.com/users/aodn/repos","events_url":"https://api.github.com/users/aodn/events{/privacy}","received_events_url":"https://api.github.com/users/aodn/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aodn/data-services","description":"Data Services scripts","fork":false,"url":"https://api.github.com/repos/aodn/data-services","forks_url":"https://api.github.com/repos/aodn/data-services/forks","keys_url":"https://api.github.com/repos/aodn/data-services/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aodn/data-services/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aodn/data-services/teams","hooks_url":"https://api.github.com/repos/aodn/data-services/hooks","issue_events_url":"https://api.github.com/repos/aodn/data-services/issues/events{/number}","events_url":"https://api.github.com/repos/aodn/data-services/events","assignees_url":"https://api.github.com/repos/aodn/data-services/assignees{/user}","branches_url":"https://api.github.com/repos/aodn/data-services/branches{/branch}","tags_url":"https://api.github.com/repos/aodn/data-services/tags","blobs_url":"https://api.github.com/repos/aodn/data-services/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aodn/data-services/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aodn/data-services/git/refs{/sha}","trees_url":"https://api.github.com/repos/aodn/data-services/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aodn/data-services/statuses/{sha}","languages_url":"https://api.github.com/repos/aodn/data-services/languages","stargazers_url":"https://api.github.com/repos/aodn/data-services/stargazers","contributors_url":"https://api.github.com/repos/aodn/data-services/contributors","subscribers_url":"https://api.github.com/repos/aodn/data-services/subscribers","subscription_url":"https://api.github.com/repos/aodn/data-services/subscription","commits_url":"https://api.github.com/repos/aodn/data-services/commits{/sha}","git_commits_url":"https://api.github.com/repos/aodn/data-services/git/commits{/sha}","comments_url":"https://api.github.com/repos/aodn/data-services/comments{/number}","issue_comment_url":"https://api.github.com/repos/aodn/data-services/issues/comments{/number}","contents_url":"https://api.github.com/repos/aodn/data-services/contents/{+path}","compare_url":"https://api.github.com/repos/aodn/data-services/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aodn/data-services/merges","archive_url":"https://api.github.com/repos/aodn/data-services/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aodn/data-services/downloads","issues_url":"https://api.github.com/repos/aodn/data-services/issues{/number}","pulls_url":"https://api.github.com/repos/aodn/data-services/pulls{/number}","milestones_url":"https://api.github.com/repos/aodn/data-services/milestones{/number}","notifications_url":"https://api.github.com/repos/aodn/data-services/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aodn/data-services/labels{/name}","releases_url":"https://api.github.com/repos/aodn/data-services/releases{/id}","deployments_url":"https://api.github.com/repos/aodn/data-services/deployments","created_at":"2014-02-27T04:30:35Z","updated_at":"2016-03-06T23:16:26Z","pushed_at":"2016-04-18T04:57:57Z","git_url":"git://github.com/aodn/data-services.git","ssh_url":"git@github.com:aodn/data-services.git","clone_url":"https://github.com/aodn/data-services.git","svn_url":"https://github.com/aodn/data-services","homepage":null,"size":51590,"stargazers_count":0,"watchers_count":0,"language":"Matlab","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":9,"forks":0,"open_issues":9,"watchers":0,"default_branch":"master"}},"base":{"label":"aodn:master","ref":"master","sha":"ea896993e4d2c7c89d3e56fc2d7cdbfc3473a903","user":{"login":"aodn","id":2802166,"avatar_url":"https://avatars.githubusercontent.com/u/2802166?v=3","gravatar_id":"","url":"https://api.github.com/users/aodn","html_url":"https://github.com/aodn","followers_url":"https://api.github.com/users/aodn/followers","following_url":"https://api.github.com/users/aodn/following{/other_user}","gists_url":"https://api.github.com/users/aodn/gists{/gist_id}","starred_url":"https://api.github.com/users/aodn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aodn/subscriptions","organizations_url":"https://api.github.com/users/aodn/orgs","repos_url":"https://api.github.com/users/aodn/repos","events_url":"https://api.github.com/users/aodn/events{/privacy}","received_events_url":"https://api.github.com/users/aodn/received_events","type":"Organization","site_admin":false},"repo":{"id":17236639,"name":"data-services","full_name":"aodn/data-services","owner":{"login":"aodn","id":2802166,"avatar_url":"https://avatars.githubusercontent.com/u/2802166?v=3","gravatar_id":"","url":"https://api.github.com/users/aodn","html_url":"https://github.com/aodn","followers_url":"https://api.github.com/users/aodn/followers","following_url":"https://api.github.com/users/aodn/following{/other_user}","gists_url":"https://api.github.com/users/aodn/gists{/gist_id}","starred_url":"https://api.github.com/users/aodn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aodn/subscriptions","organizations_url":"https://api.github.com/users/aodn/orgs","repos_url":"https://api.github.com/users/aodn/repos","events_url":"https://api.github.com/users/aodn/events{/privacy}","received_events_url":"https://api.github.com/users/aodn/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aodn/data-services","description":"Data Services scripts","fork":false,"url":"https://api.github.com/repos/aodn/data-services","forks_url":"https://api.github.com/repos/aodn/data-services/forks","keys_url":"https://api.github.com/repos/aodn/data-services/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aodn/data-services/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aodn/data-services/teams","hooks_url":"https://api.github.com/repos/aodn/data-services/hooks","issue_events_url":"https://api.github.com/repos/aodn/data-services/issues/events{/number}","events_url":"https://api.github.com/repos/aodn/data-services/events","assignees_url":"https://api.github.com/repos/aodn/data-services/assignees{/user}","branches_url":"https://api.github.com/repos/aodn/data-services/branches{/branch}","tags_url":"https://api.github.com/repos/aodn/data-services/tags","blobs_url":"https://api.github.com/repos/aodn/data-services/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aodn/data-services/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aodn/data-services/git/refs{/sha}","trees_url":"https://api.github.com/repos/aodn/data-services/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aodn/data-services/statuses/{sha}","languages_url":"https://api.github.com/repos/aodn/data-services/languages","stargazers_url":"https://api.github.com/repos/aodn/data-services/stargazers","contributors_url":"https://api.github.com/repos/aodn/data-services/contributors","subscribers_url":"https://api.github.com/repos/aodn/data-services/subscribers","subscription_url":"https://api.github.com/repos/aodn/data-services/subscription","commits_url":"https://api.github.com/repos/aodn/data-services/commits{/sha}","git_commits_url":"https://api.github.com/repos/aodn/data-services/git/commits{/sha}","comments_url":"https://api.github.com/repos/aodn/data-services/comments{/number}","issue_comment_url":"https://api.github.com/repos/aodn/data-services/issues/comments{/number}","contents_url":"https://api.github.com/repos/aodn/data-services/contents/{+path}","compare_url":"https://api.github.com/repos/aodn/data-services/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aodn/data-services/merges","archive_url":"https://api.github.com/repos/aodn/data-services/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aodn/data-services/downloads","issues_url":"https://api.github.com/repos/aodn/data-services/issues{/number}","pulls_url":"https://api.github.com/repos/aodn/data-services/pulls{/number}","milestones_url":"https://api.github.com/repos/aodn/data-services/milestones{/number}","notifications_url":"https://api.github.com/repos/aodn/data-services/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aodn/data-services/labels{/name}","releases_url":"https://api.github.com/repos/aodn/data-services/releases{/id}","deployments_url":"https://api.github.com/repos/aodn/data-services/deployments","created_at":"2014-02-27T04:30:35Z","updated_at":"2016-03-06T23:16:26Z","pushed_at":"2016-04-18T04:57:57Z","git_url":"git://github.com/aodn/data-services.git","ssh_url":"git@github.com:aodn/data-services.git","clone_url":"https://github.com/aodn/data-services.git","svn_url":"https://github.com/aodn/data-services","homepage":null,"size":51590,"stargazers_count":0,"watchers_count":0,"language":"Matlab","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":9,"forks":0,"open_issues":9,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/aodn/data-services/pulls/418"},"html":{"href":"https://github.com/aodn/data-services/pull/418"},"issue":{"href":"https://api.github.com/repos/aodn/data-services/issues/418"},"comments":{"href":"https://api.github.com/repos/aodn/data-services/issues/418/comments"},"review_comments":{"href":"https://api.github.com/repos/aodn/data-services/pulls/418/comments"},"review_comment":{"href":"https://api.github.com/repos/aodn/data-services/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/aodn/data-services/pulls/418/commits"},"statuses":{"href":"https://api.github.com/repos/aodn/data-services/statuses/638d25b12d56c0f6ea7b6c03052aeec9729bd46c"}}}}