{"action":"created","comment":{"url":"https://api.github.com/repos/conda/conda/pulls/comments/39556691","id":39556691,"diff_hunk":"@@ -525,28 +542,20 @@ def move_to_trash(prefix, f, tempdir=None):\n             if e1.errno != errno.EEXIST:\n                 continue\n \n-        if tempdir is None:\n-            import tempfile\n-            trash_dir = tempfile.mkdtemp(dir=trash_dir)\n-        else:\n-            trash_dir = join(trash_dir, tempdir)\n+        trash_dir = tempfile.mkdtemp(dir=trash_dir)\n \n         try:\n-            try:\n-                os.makedirs(join(trash_dir, dirname(f)))","path":"conda/install.py","position":73,"original_position":73,"commit_id":"8cc9fbdc659b780dd81ad4576c51e639edd9e6c5","original_commit_id":"8cc9fbdc659b780dd81ad4576c51e639edd9e6c5","user":{"login":"campos-ddc","id":893630,"avatar_url":"https://avatars.githubusercontent.com/u/893630?v=3","gravatar_id":"","url":"https://api.github.com/users/campos-ddc","html_url":"https://github.com/campos-ddc","followers_url":"https://api.github.com/users/campos-ddc/followers","following_url":"https://api.github.com/users/campos-ddc/following{/other_user}","gists_url":"https://api.github.com/users/campos-ddc/gists{/gist_id}","starred_url":"https://api.github.com/users/campos-ddc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/campos-ddc/subscriptions","organizations_url":"https://api.github.com/users/campos-ddc/orgs","repos_url":"https://api.github.com/users/campos-ddc/repos","events_url":"https://api.github.com/users/campos-ddc/events{/privacy}","received_events_url":"https://api.github.com/users/campos-ddc/received_events","type":"User","site_admin":false},"body":"No longer creating a new directory with `dirname(f)`, I just put the file directory in the tempdir.","created_at":"2015-09-15T19:55:34Z","updated_at":"2015-09-15T19:55:34Z","html_url":"https://github.com/conda/conda/pull/1618#discussion_r39556691","pull_request_url":"https://api.github.com/repos/conda/conda/pulls/1618","_links":{"self":{"href":"https://api.github.com/repos/conda/conda/pulls/comments/39556691"},"html":{"href":"https://github.com/conda/conda/pull/1618#discussion_r39556691"},"pull_request":{"href":"https://api.github.com/repos/conda/conda/pulls/1618"}}},"pull_request":{"url":"https://api.github.com/repos/conda/conda/pulls/1618","id":45083064,"html_url":"https://github.com/conda/conda/pull/1618","diff_url":"https://github.com/conda/conda/pull/1618.diff","patch_url":"https://github.com/conda/conda/pull/1618.patch","issue_url":"https://api.github.com/repos/conda/conda/issues/1618","number":1618,"state":"open","locked":false,"title":"Moving files to trash if failed to remove them in windows","user":{"login":"campos-ddc","id":893630,"avatar_url":"https://avatars.githubusercontent.com/u/893630?v=3","gravatar_id":"","url":"https://api.github.com/users/campos-ddc","html_url":"https://github.com/campos-ddc","followers_url":"https://api.github.com/users/campos-ddc/followers","following_url":"https://api.github.com/users/campos-ddc/following{/other_user}","gists_url":"https://api.github.com/users/campos-ddc/gists{/gist_id}","starred_url":"https://api.github.com/users/campos-ddc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/campos-ddc/subscriptions","organizations_url":"https://api.github.com/users/campos-ddc/orgs","repos_url":"https://api.github.com/users/campos-ddc/repos","events_url":"https://api.github.com/users/campos-ddc/events{/privacy}","received_events_url":"https://api.github.com/users/campos-ddc/received_events","type":"User","site_admin":false},"body":"This change will attempt to 'fix' issues when removing locked files in Windows.\r\n\r\nTo avoid that problem, I just used the trash mechanism already implemented in conda, and put it into `rm_rf`.\r\n\r\nI slightly broke the api for `move_to_trash, but it doesn't look like the `tempdir` was used anywhere.\r\n\r\nFixes #1594","created_at":"2015-09-15T18:13:42Z","updated_at":"2015-09-15T19:55:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3bd3c6aa4a1cb72f65c5cd0acbb85752d6ef004c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/conda/conda/pulls/1618/commits","review_comments_url":"https://api.github.com/repos/conda/conda/pulls/1618/comments","review_comment_url":"https://api.github.com/repos/conda/conda/pulls/comments{/number}","comments_url":"https://api.github.com/repos/conda/conda/issues/1618/comments","statuses_url":"https://api.github.com/repos/conda/conda/statuses/8cc9fbdc659b780dd81ad4576c51e639edd9e6c5","head":{"label":"ESSS:fix/rm-rf-locked-files-windows","ref":"fix/rm-rf-locked-files-windows","sha":"8cc9fbdc659b780dd81ad4576c51e639edd9e6c5","user":{"login":"ESSS","id":1074769,"avatar_url":"https://avatars.githubusercontent.com/u/1074769?v=3","gravatar_id":"","url":"https://api.github.com/users/ESSS","html_url":"https://github.com/ESSS","followers_url":"https://api.github.com/users/ESSS/followers","following_url":"https://api.github.com/users/ESSS/following{/other_user}","gists_url":"https://api.github.com/users/ESSS/gists{/gist_id}","starred_url":"https://api.github.com/users/ESSS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ESSS/subscriptions","organizations_url":"https://api.github.com/users/ESSS/orgs","repos_url":"https://api.github.com/users/ESSS/repos","events_url":"https://api.github.com/users/ESSS/events{/privacy}","received_events_url":"https://api.github.com/users/ESSS/received_events","type":"Organization","site_admin":false},"repo":{"id":18064023,"name":"conda","full_name":"ESSS/conda","owner":{"login":"ESSS","id":1074769,"avatar_url":"https://avatars.githubusercontent.com/u/1074769?v=3","gravatar_id":"","url":"https://api.github.com/users/ESSS","html_url":"https://github.com/ESSS","followers_url":"https://api.github.com/users/ESSS/followers","following_url":"https://api.github.com/users/ESSS/following{/other_user}","gists_url":"https://api.github.com/users/ESSS/gists{/gist_id}","starred_url":"https://api.github.com/users/ESSS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ESSS/subscriptions","organizations_url":"https://api.github.com/users/ESSS/orgs","repos_url":"https://api.github.com/users/ESSS/repos","events_url":"https://api.github.com/users/ESSS/events{/privacy}","received_events_url":"https://api.github.com/users/ESSS/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ESSS/conda","description":"Cross-platform, Python-agnostic binary package manager","fork":true,"url":"https://api.github.com/repos/ESSS/conda","forks_url":"https://api.github.com/repos/ESSS/conda/forks","keys_url":"https://api.github.com/repos/ESSS/conda/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ESSS/conda/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ESSS/conda/teams","hooks_url":"https://api.github.com/repos/ESSS/conda/hooks","issue_events_url":"https://api.github.com/repos/ESSS/conda/issues/events{/number}","events_url":"https://api.github.com/repos/ESSS/conda/events","assignees_url":"https://api.github.com/repos/ESSS/conda/assignees{/user}","branches_url":"https://api.github.com/repos/ESSS/conda/branches{/branch}","tags_url":"https://api.github.com/repos/ESSS/conda/tags","blobs_url":"https://api.github.com/repos/ESSS/conda/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ESSS/conda/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ESSS/conda/git/refs{/sha}","trees_url":"https://api.github.com/repos/ESSS/conda/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ESSS/conda/statuses/{sha}","languages_url":"https://api.github.com/repos/ESSS/conda/languages","stargazers_url":"https://api.github.com/repos/ESSS/conda/stargazers","contributors_url":"https://api.github.com/repos/ESSS/conda/contributors","subscribers_url":"https://api.github.com/repos/ESSS/conda/subscribers","subscription_url":"https://api.github.com/repos/ESSS/conda/subscription","commits_url":"https://api.github.com/repos/ESSS/conda/commits{/sha}","git_commits_url":"https://api.github.com/repos/ESSS/conda/git/commits{/sha}","comments_url":"https://api.github.com/repos/ESSS/conda/comments{/number}","issue_comment_url":"https://api.github.com/repos/ESSS/conda/issues/comments{/number}","contents_url":"https://api.github.com/repos/ESSS/conda/contents/{+path}","compare_url":"https://api.github.com/repos/ESSS/conda/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ESSS/conda/merges","archive_url":"https://api.github.com/repos/ESSS/conda/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ESSS/conda/downloads","issues_url":"https://api.github.com/repos/ESSS/conda/issues{/number}","pulls_url":"https://api.github.com/repos/ESSS/conda/pulls{/number}","milestones_url":"https://api.github.com/repos/ESSS/conda/milestones{/number}","notifications_url":"https://api.github.com/repos/ESSS/conda/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ESSS/conda/labels{/name}","releases_url":"https://api.github.com/repos/ESSS/conda/releases{/id}","created_at":"2014-03-24T13:49:34Z","updated_at":"2015-03-19T15:32:52Z","pushed_at":"2015-09-15T18:09:18Z","git_url":"git://github.com/ESSS/conda.git","ssh_url":"git@github.com:ESSS/conda.git","clone_url":"https://github.com/ESSS/conda.git","svn_url":"https://github.com/ESSS/conda","homepage":"conda.pydata.org","size":6153,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"conda:master","ref":"master","sha":"1b100cde07dac3769e1dbffcb05e11574b9a416b","user":{"login":"conda","id":6392739,"avatar_url":"https://avatars.githubusercontent.com/u/6392739?v=3","gravatar_id":"","url":"https://api.github.com/users/conda","html_url":"https://github.com/conda","followers_url":"https://api.github.com/users/conda/followers","following_url":"https://api.github.com/users/conda/following{/other_user}","gists_url":"https://api.github.com/users/conda/gists{/gist_id}","starred_url":"https://api.github.com/users/conda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/conda/subscriptions","organizations_url":"https://api.github.com/users/conda/orgs","repos_url":"https://api.github.com/users/conda/repos","events_url":"https://api.github.com/users/conda/events{/privacy}","received_events_url":"https://api.github.com/users/conda/received_events","type":"Organization","site_admin":false},"repo":{"id":6235174,"name":"conda","full_name":"conda/conda","owner":{"login":"conda","id":6392739,"avatar_url":"https://avatars.githubusercontent.com/u/6392739?v=3","gravatar_id":"","url":"https://api.github.com/users/conda","html_url":"https://github.com/conda","followers_url":"https://api.github.com/users/conda/followers","following_url":"https://api.github.com/users/conda/following{/other_user}","gists_url":"https://api.github.com/users/conda/gists{/gist_id}","starred_url":"https://api.github.com/users/conda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/conda/subscriptions","organizations_url":"https://api.github.com/users/conda/orgs","repos_url":"https://api.github.com/users/conda/repos","events_url":"https://api.github.com/users/conda/events{/privacy}","received_events_url":"https://api.github.com/users/conda/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/conda/conda","description":"Cross-platform, Python-agnostic binary package manager","fork":false,"url":"https://api.github.com/repos/conda/conda","forks_url":"https://api.github.com/repos/conda/conda/forks","keys_url":"https://api.github.com/repos/conda/conda/keys{/key_id}","collaborators_url":"https://api.github.com/repos/conda/conda/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/conda/conda/teams","hooks_url":"https://api.github.com/repos/conda/conda/hooks","issue_events_url":"https://api.github.com/repos/conda/conda/issues/events{/number}","events_url":"https://api.github.com/repos/conda/conda/events","assignees_url":"https://api.github.com/repos/conda/conda/assignees{/user}","branches_url":"https://api.github.com/repos/conda/conda/branches{/branch}","tags_url":"https://api.github.com/repos/conda/conda/tags","blobs_url":"https://api.github.com/repos/conda/conda/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/conda/conda/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/conda/conda/git/refs{/sha}","trees_url":"https://api.github.com/repos/conda/conda/git/trees{/sha}","statuses_url":"https://api.github.com/repos/conda/conda/statuses/{sha}","languages_url":"https://api.github.com/repos/conda/conda/languages","stargazers_url":"https://api.github.com/repos/conda/conda/stargazers","contributors_url":"https://api.github.com/repos/conda/conda/contributors","subscribers_url":"https://api.github.com/repos/conda/conda/subscribers","subscription_url":"https://api.github.com/repos/conda/conda/subscription","commits_url":"https://api.github.com/repos/conda/conda/commits{/sha}","git_commits_url":"https://api.github.com/repos/conda/conda/git/commits{/sha}","comments_url":"https://api.github.com/repos/conda/conda/comments{/number}","issue_comment_url":"https://api.github.com/repos/conda/conda/issues/comments{/number}","contents_url":"https://api.github.com/repos/conda/conda/contents/{+path}","compare_url":"https://api.github.com/repos/conda/conda/compare/{base}...{head}","merges_url":"https://api.github.com/repos/conda/conda/merges","archive_url":"https://api.github.com/repos/conda/conda/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/conda/conda/downloads","issues_url":"https://api.github.com/repos/conda/conda/issues{/number}","pulls_url":"https://api.github.com/repos/conda/conda/pulls{/number}","milestones_url":"https://api.github.com/repos/conda/conda/milestones{/number}","notifications_url":"https://api.github.com/repos/conda/conda/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/conda/conda/labels{/name}","releases_url":"https://api.github.com/repos/conda/conda/releases{/id}","created_at":"2012-10-15T22:08:03Z","updated_at":"2015-09-15T19:51:11Z","pushed_at":"2015-09-15T18:37:42Z","git_url":"git://github.com/conda/conda.git","ssh_url":"git@github.com:conda/conda.git","clone_url":"https://github.com/conda/conda.git","svn_url":"https://github.com/conda/conda","homepage":"conda.pydata.org","size":17975,"stargazers_count":459,"watchers_count":459,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":147,"mirror_url":null,"open_issues_count":530,"forks":147,"open_issues":530,"watchers":459,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/conda/conda/pulls/1618"},"html":{"href":"https://github.com/conda/conda/pull/1618"},"issue":{"href":"https://api.github.com/repos/conda/conda/issues/1618"},"comments":{"href":"https://api.github.com/repos/conda/conda/issues/1618/comments"},"review_comments":{"href":"https://api.github.com/repos/conda/conda/pulls/1618/comments"},"review_comment":{"href":"https://api.github.com/repos/conda/conda/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/conda/conda/pulls/1618/commits"},"statuses":{"href":"https://api.github.com/repos/conda/conda/statuses/8cc9fbdc659b780dd81ad4576c51e639edd9e6c5"}}}}