{"action":"created","comment":{"url":"https://api.github.com/repos/girder/girder/pulls/comments/22595962","id":22595962,"diff_hunk":"@@ -434,7 +437,7 @@ def _transformFilename(self, name):\n         name = name.replace(os.path.sep, ' ')\n         if os.path.altsep:\n             name = name.replace(os.path.altsep, ' ')\n-        return re.sub(r'^[/\\\\]+', '', name)\n+        return _safeNameRegex.sub('', name)","path":"clients/python/girder_client.py","position":15,"original_position":15,"commit_id":"ecc6f7ddb500b66f7acc0ee3d2fbc2a416382eff","original_commit_id":"ecc6f7ddb500b66f7acc0ee3d2fbc2a416382eff","user":{"login":"zachmullen","id":555959,"avatar_url":"https://avatars.githubusercontent.com/u/555959?v=3","gravatar_id":"","url":"https://api.github.com/users/zachmullen","html_url":"https://github.com/zachmullen","followers_url":"https://api.github.com/users/zachmullen/followers","following_url":"https://api.github.com/users/zachmullen/following{/other_user}","gists_url":"https://api.github.com/users/zachmullen/gists{/gist_id}","starred_url":"https://api.github.com/users/zachmullen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zachmullen/subscriptions","organizations_url":"https://api.github.com/users/zachmullen/orgs","repos_url":"https://api.github.com/users/zachmullen/repos","events_url":"https://api.github.com/users/zachmullen/events{/privacy}","received_events_url":"https://api.github.com/users/zachmullen/received_events","type":"User","site_admin":false},"body":"That's a good point, I'll go ahead and make it the underscore, since I'm not sure about having a filename that is entirely whitespace. :)\r\n","created_at":"2015-01-07T16:20:45Z","updated_at":"2015-01-07T16:20:45Z","html_url":"https://github.com/girder/girder/pull/601#discussion_r22595962","pull_request_url":"https://api.github.com/repos/girder/girder/pulls/601","_links":{"self":{"href":"https://api.github.com/repos/girder/girder/pulls/comments/22595962"},"html":{"href":"https://github.com/girder/girder/pull/601#discussion_r22595962"},"pull_request":{"href":"https://api.github.com/repos/girder/girder/pulls/601"}}},"pull_request":{"url":"https://api.github.com/repos/girder/girder/pulls/601","id":26966441,"html_url":"https://github.com/girder/girder/pull/601","diff_url":"https://github.com/girder/girder/pull/601.diff","patch_url":"https://github.com/girder/girder/pull/601.patch","issue_url":"https://api.github.com/repos/girder/girder/issues/601","number":601,"state":"open","locked":false,"title":"Use robust makedirs logic","user":{"login":"zachmullen","id":555959,"avatar_url":"https://avatars.githubusercontent.com/u/555959?v=3","gravatar_id":"","url":"https://api.github.com/users/zachmullen","html_url":"https://github.com/zachmullen","followers_url":"https://api.github.com/users/zachmullen/followers","following_url":"https://api.github.com/users/zachmullen/following{/other_user}","gists_url":"https://api.github.com/users/zachmullen/gists{/gist_id}","starred_url":"https://api.github.com/users/zachmullen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zachmullen/subscriptions","organizations_url":"https://api.github.com/users/zachmullen/orgs","repos_url":"https://api.github.com/users/zachmullen/repos","events_url":"https://api.github.com/users/zachmullen/events{/privacy}","received_events_url":"https://api.github.com/users/zachmullen/received_events","type":"User","site_admin":false},"body":"Also precompile the regex for name cleaning since we use it for\r\nevery file and directory.","created_at":"2015-01-07T16:01:52Z","updated_at":"2015-01-07T16:20:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c5cdd46b22366b116e96913a09ac1944dfa16430","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/girder/girder/pulls/601/commits","review_comments_url":"https://api.github.com/repos/girder/girder/pulls/601/comments","review_comment_url":"https://api.github.com/repos/girder/girder/pulls/comments/{number}","comments_url":"https://api.github.com/repos/girder/girder/issues/601/comments","statuses_url":"https://api.github.com/repos/girder/girder/statuses/ecc6f7ddb500b66f7acc0ee3d2fbc2a416382eff","head":{"label":"girder:safe-makedirs","ref":"safe-makedirs","sha":"ecc6f7ddb500b66f7acc0ee3d2fbc2a416382eff","user":{"login":"girder","id":5150517,"avatar_url":"https://avatars.githubusercontent.com/u/5150517?v=3","gravatar_id":"","url":"https://api.github.com/users/girder","html_url":"https://github.com/girder","followers_url":"https://api.github.com/users/girder/followers","following_url":"https://api.github.com/users/girder/following{/other_user}","gists_url":"https://api.github.com/users/girder/gists{/gist_id}","starred_url":"https://api.github.com/users/girder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/girder/subscriptions","organizations_url":"https://api.github.com/users/girder/orgs","repos_url":"https://api.github.com/users/girder/repos","events_url":"https://api.github.com/users/girder/events{/privacy}","received_events_url":"https://api.github.com/users/girder/received_events","type":"Organization","site_admin":false},"repo":{"id":11854950,"name":"girder","full_name":"girder/girder","owner":{"login":"girder","id":5150517,"avatar_url":"https://avatars.githubusercontent.com/u/5150517?v=3","gravatar_id":"","url":"https://api.github.com/users/girder","html_url":"https://github.com/girder","followers_url":"https://api.github.com/users/girder/followers","following_url":"https://api.github.com/users/girder/following{/other_user}","gists_url":"https://api.github.com/users/girder/gists{/gist_id}","starred_url":"https://api.github.com/users/girder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/girder/subscriptions","organizations_url":"https://api.github.com/users/girder/orgs","repos_url":"https://api.github.com/users/girder/repos","events_url":"https://api.github.com/users/girder/events{/privacy}","received_events_url":"https://api.github.com/users/girder/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/girder/girder","description":"High performance data management for the web","fork":false,"url":"https://api.github.com/repos/girder/girder","forks_url":"https://api.github.com/repos/girder/girder/forks","keys_url":"https://api.github.com/repos/girder/girder/keys{/key_id}","collaborators_url":"https://api.github.com/repos/girder/girder/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/girder/girder/teams","hooks_url":"https://api.github.com/repos/girder/girder/hooks","issue_events_url":"https://api.github.com/repos/girder/girder/issues/events{/number}","events_url":"https://api.github.com/repos/girder/girder/events","assignees_url":"https://api.github.com/repos/girder/girder/assignees{/user}","branches_url":"https://api.github.com/repos/girder/girder/branches{/branch}","tags_url":"https://api.github.com/repos/girder/girder/tags","blobs_url":"https://api.github.com/repos/girder/girder/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/girder/girder/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/girder/girder/git/refs{/sha}","trees_url":"https://api.github.com/repos/girder/girder/git/trees{/sha}","statuses_url":"https://api.github.com/repos/girder/girder/statuses/{sha}","languages_url":"https://api.github.com/repos/girder/girder/languages","stargazers_url":"https://api.github.com/repos/girder/girder/stargazers","contributors_url":"https://api.github.com/repos/girder/girder/contributors","subscribers_url":"https://api.github.com/repos/girder/girder/subscribers","subscription_url":"https://api.github.com/repos/girder/girder/subscription","commits_url":"https://api.github.com/repos/girder/girder/commits{/sha}","git_commits_url":"https://api.github.com/repos/girder/girder/git/commits{/sha}","comments_url":"https://api.github.com/repos/girder/girder/comments{/number}","issue_comment_url":"https://api.github.com/repos/girder/girder/issues/comments/{number}","contents_url":"https://api.github.com/repos/girder/girder/contents/{+path}","compare_url":"https://api.github.com/repos/girder/girder/compare/{base}...{head}","merges_url":"https://api.github.com/repos/girder/girder/merges","archive_url":"https://api.github.com/repos/girder/girder/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/girder/girder/downloads","issues_url":"https://api.github.com/repos/girder/girder/issues{/number}","pulls_url":"https://api.github.com/repos/girder/girder/pulls{/number}","milestones_url":"https://api.github.com/repos/girder/girder/milestones{/number}","notifications_url":"https://api.github.com/repos/girder/girder/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/girder/girder/labels{/name}","releases_url":"https://api.github.com/repos/girder/girder/releases{/id}","created_at":"2013-08-02T23:55:54Z","updated_at":"2015-01-06T22:52:58Z","pushed_at":"2015-01-07T16:01:46Z","git_url":"git://github.com/girder/girder.git","ssh_url":"git@github.com:girder/girder.git","clone_url":"https://github.com/girder/girder.git","svn_url":"https://github.com/girder/girder","homepage":"http://girder.readthedocs.org","size":8403,"stargazers_count":14,"watchers_count":14,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":16,"mirror_url":null,"open_issues_count":64,"forks":16,"open_issues":64,"watchers":14,"default_branch":"master"}},"base":{"label":"girder:master","ref":"master","sha":"a0ebeb76ddd7aa01a5fcdd696fb5ce92a5da11cc","user":{"login":"girder","id":5150517,"avatar_url":"https://avatars.githubusercontent.com/u/5150517?v=3","gravatar_id":"","url":"https://api.github.com/users/girder","html_url":"https://github.com/girder","followers_url":"https://api.github.com/users/girder/followers","following_url":"https://api.github.com/users/girder/following{/other_user}","gists_url":"https://api.github.com/users/girder/gists{/gist_id}","starred_url":"https://api.github.com/users/girder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/girder/subscriptions","organizations_url":"https://api.github.com/users/girder/orgs","repos_url":"https://api.github.com/users/girder/repos","events_url":"https://api.github.com/users/girder/events{/privacy}","received_events_url":"https://api.github.com/users/girder/received_events","type":"Organization","site_admin":false},"repo":{"id":11854950,"name":"girder","full_name":"girder/girder","owner":{"login":"girder","id":5150517,"avatar_url":"https://avatars.githubusercontent.com/u/5150517?v=3","gravatar_id":"","url":"https://api.github.com/users/girder","html_url":"https://github.com/girder","followers_url":"https://api.github.com/users/girder/followers","following_url":"https://api.github.com/users/girder/following{/other_user}","gists_url":"https://api.github.com/users/girder/gists{/gist_id}","starred_url":"https://api.github.com/users/girder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/girder/subscriptions","organizations_url":"https://api.github.com/users/girder/orgs","repos_url":"https://api.github.com/users/girder/repos","events_url":"https://api.github.com/users/girder/events{/privacy}","received_events_url":"https://api.github.com/users/girder/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/girder/girder","description":"High performance data management for the web","fork":false,"url":"https://api.github.com/repos/girder/girder","forks_url":"https://api.github.com/repos/girder/girder/forks","keys_url":"https://api.github.com/repos/girder/girder/keys{/key_id}","collaborators_url":"https://api.github.com/repos/girder/girder/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/girder/girder/teams","hooks_url":"https://api.github.com/repos/girder/girder/hooks","issue_events_url":"https://api.github.com/repos/girder/girder/issues/events{/number}","events_url":"https://api.github.com/repos/girder/girder/events","assignees_url":"https://api.github.com/repos/girder/girder/assignees{/user}","branches_url":"https://api.github.com/repos/girder/girder/branches{/branch}","tags_url":"https://api.github.com/repos/girder/girder/tags","blobs_url":"https://api.github.com/repos/girder/girder/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/girder/girder/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/girder/girder/git/refs{/sha}","trees_url":"https://api.github.com/repos/girder/girder/git/trees{/sha}","statuses_url":"https://api.github.com/repos/girder/girder/statuses/{sha}","languages_url":"https://api.github.com/repos/girder/girder/languages","stargazers_url":"https://api.github.com/repos/girder/girder/stargazers","contributors_url":"https://api.github.com/repos/girder/girder/contributors","subscribers_url":"https://api.github.com/repos/girder/girder/subscribers","subscription_url":"https://api.github.com/repos/girder/girder/subscription","commits_url":"https://api.github.com/repos/girder/girder/commits{/sha}","git_commits_url":"https://api.github.com/repos/girder/girder/git/commits{/sha}","comments_url":"https://api.github.com/repos/girder/girder/comments{/number}","issue_comment_url":"https://api.github.com/repos/girder/girder/issues/comments/{number}","contents_url":"https://api.github.com/repos/girder/girder/contents/{+path}","compare_url":"https://api.github.com/repos/girder/girder/compare/{base}...{head}","merges_url":"https://api.github.com/repos/girder/girder/merges","archive_url":"https://api.github.com/repos/girder/girder/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/girder/girder/downloads","issues_url":"https://api.github.com/repos/girder/girder/issues{/number}","pulls_url":"https://api.github.com/repos/girder/girder/pulls{/number}","milestones_url":"https://api.github.com/repos/girder/girder/milestones{/number}","notifications_url":"https://api.github.com/repos/girder/girder/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/girder/girder/labels{/name}","releases_url":"https://api.github.com/repos/girder/girder/releases{/id}","created_at":"2013-08-02T23:55:54Z","updated_at":"2015-01-06T22:52:58Z","pushed_at":"2015-01-07T16:01:46Z","git_url":"git://github.com/girder/girder.git","ssh_url":"git@github.com:girder/girder.git","clone_url":"https://github.com/girder/girder.git","svn_url":"https://github.com/girder/girder","homepage":"http://girder.readthedocs.org","size":8403,"stargazers_count":14,"watchers_count":14,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":16,"mirror_url":null,"open_issues_count":64,"forks":16,"open_issues":64,"watchers":14,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/girder/girder/pulls/601"},"html":{"href":"https://github.com/girder/girder/pull/601"},"issue":{"href":"https://api.github.com/repos/girder/girder/issues/601"},"comments":{"href":"https://api.github.com/repos/girder/girder/issues/601/comments"},"review_comments":{"href":"https://api.github.com/repos/girder/girder/pulls/601/comments"},"review_comment":{"href":"https://api.github.com/repos/girder/girder/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/girder/girder/pulls/601/commits"},"statuses":{"href":"https://api.github.com/repos/girder/girder/statuses/ecc6f7ddb500b66f7acc0ee3d2fbc2a416382eff"}}}}