{"action":"opened","number":2928,"pull_request":{"url":"https://api.github.com/repos/crystal-lang/crystal/pulls/2928","id":75639583,"html_url":"https://github.com/crystal-lang/crystal/pull/2928","diff_url":"https://github.com/crystal-lang/crystal/pull/2928.diff","patch_url":"https://github.com/crystal-lang/crystal/pull/2928.patch","issue_url":"https://api.github.com/repos/crystal-lang/crystal/issues/2928","number":2928,"state":"open","locked":false,"title":"FileUtils#rm_r removes a symlink itself","user":{"login":"mosop","id":7900662,"avatar_url":"https://avatars.githubusercontent.com/u/7900662?v=3","gravatar_id":"","url":"https://api.github.com/users/mosop","html_url":"https://github.com/mosop","followers_url":"https://api.github.com/users/mosop/followers","following_url":"https://api.github.com/users/mosop/following{/other_user}","gists_url":"https://api.github.com/users/mosop/gists{/gist_id}","starred_url":"https://api.github.com/users/mosop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mosop/subscriptions","organizations_url":"https://api.github.com/users/mosop/orgs","repos_url":"https://api.github.com/users/mosop/repos","events_url":"https://api.github.com/users/mosop/events{/privacy}","received_events_url":"https://api.github.com/users/mosop/received_events","type":"User","site_admin":false},"body":"This is for fix and improvement both.\r\n\r\nIf a directory have a symbolic link, `FileUtils#rm_r` fails with an error message like:\r\n\r\n```\r\nUnable to remove directory '/path/to/the/symlink': Not a directory\r\n```\r\n\r\nAnd if the symlink also points to a directory, rm_r also deletes all files under the directory. I feel it's a bit dangerous. The `rm` command and Ruby's `FileUtils#rm_r` remove a symlink itself instead.\r\n\r\nThank you!","created_at":"2016-06-29T12:33:19Z","updated_at":"2016-06-29T12:33:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9174719058e682b16db6749941edab75e5899ac1","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/crystal-lang/crystal/pulls/2928/commits","review_comments_url":"https://api.github.com/repos/crystal-lang/crystal/pulls/2928/comments","review_comment_url":"https://api.github.com/repos/crystal-lang/crystal/pulls/comments{/number}","comments_url":"https://api.github.com/repos/crystal-lang/crystal/issues/2928/comments","statuses_url":"https://api.github.com/repos/crystal-lang/crystal/statuses/27f874461d76fda1477d9b69d5767535fed524e3","head":{"label":"mosop:rm_r_removes_symlink_itself","ref":"rm_r_removes_symlink_itself","sha":"27f874461d76fda1477d9b69d5767535fed524e3","user":{"login":"mosop","id":7900662,"avatar_url":"https://avatars.githubusercontent.com/u/7900662?v=3","gravatar_id":"","url":"https://api.github.com/users/mosop","html_url":"https://github.com/mosop","followers_url":"https://api.github.com/users/mosop/followers","following_url":"https://api.github.com/users/mosop/following{/other_user}","gists_url":"https://api.github.com/users/mosop/gists{/gist_id}","starred_url":"https://api.github.com/users/mosop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mosop/subscriptions","organizations_url":"https://api.github.com/users/mosop/orgs","repos_url":"https://api.github.com/users/mosop/repos","events_url":"https://api.github.com/users/mosop/events{/privacy}","received_events_url":"https://api.github.com/users/mosop/received_events","type":"User","site_admin":false},"repo":{"id":53702195,"name":"crystal","full_name":"mosop/crystal","owner":{"login":"mosop","id":7900662,"avatar_url":"https://avatars.githubusercontent.com/u/7900662?v=3","gravatar_id":"","url":"https://api.github.com/users/mosop","html_url":"https://github.com/mosop","followers_url":"https://api.github.com/users/mosop/followers","following_url":"https://api.github.com/users/mosop/following{/other_user}","gists_url":"https://api.github.com/users/mosop/gists{/gist_id}","starred_url":"https://api.github.com/users/mosop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mosop/subscriptions","organizations_url":"https://api.github.com/users/mosop/orgs","repos_url":"https://api.github.com/users/mosop/repos","events_url":"https://api.github.com/users/mosop/events{/privacy}","received_events_url":"https://api.github.com/users/mosop/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mosop/crystal","description":"The Crystal Programming Language","fork":true,"url":"https://api.github.com/repos/mosop/crystal","forks_url":"https://api.github.com/repos/mosop/crystal/forks","keys_url":"https://api.github.com/repos/mosop/crystal/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mosop/crystal/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mosop/crystal/teams","hooks_url":"https://api.github.com/repos/mosop/crystal/hooks","issue_events_url":"https://api.github.com/repos/mosop/crystal/issues/events{/number}","events_url":"https://api.github.com/repos/mosop/crystal/events","assignees_url":"https://api.github.com/repos/mosop/crystal/assignees{/user}","branches_url":"https://api.github.com/repos/mosop/crystal/branches{/branch}","tags_url":"https://api.github.com/repos/mosop/crystal/tags","blobs_url":"https://api.github.com/repos/mosop/crystal/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mosop/crystal/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mosop/crystal/git/refs{/sha}","trees_url":"https://api.github.com/repos/mosop/crystal/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mosop/crystal/statuses/{sha}","languages_url":"https://api.github.com/repos/mosop/crystal/languages","stargazers_url":"https://api.github.com/repos/mosop/crystal/stargazers","contributors_url":"https://api.github.com/repos/mosop/crystal/contributors","subscribers_url":"https://api.github.com/repos/mosop/crystal/subscribers","subscription_url":"https://api.github.com/repos/mosop/crystal/subscription","commits_url":"https://api.github.com/repos/mosop/crystal/commits{/sha}","git_commits_url":"https://api.github.com/repos/mosop/crystal/git/commits{/sha}","comments_url":"https://api.github.com/repos/mosop/crystal/comments{/number}","issue_comment_url":"https://api.github.com/repos/mosop/crystal/issues/comments{/number}","contents_url":"https://api.github.com/repos/mosop/crystal/contents/{+path}","compare_url":"https://api.github.com/repos/mosop/crystal/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mosop/crystal/merges","archive_url":"https://api.github.com/repos/mosop/crystal/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mosop/crystal/downloads","issues_url":"https://api.github.com/repos/mosop/crystal/issues{/number}","pulls_url":"https://api.github.com/repos/mosop/crystal/pulls{/number}","milestones_url":"https://api.github.com/repos/mosop/crystal/milestones{/number}","notifications_url":"https://api.github.com/repos/mosop/crystal/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mosop/crystal/labels{/name}","releases_url":"https://api.github.com/repos/mosop/crystal/releases{/id}","deployments_url":"https://api.github.com/repos/mosop/crystal/deployments","created_at":"2016-03-11T23:09:03Z","updated_at":"2016-03-11T23:09:06Z","pushed_at":"2016-06-29T12:16:12Z","git_url":"git://github.com/mosop/crystal.git","ssh_url":"git@github.com:mosop/crystal.git","clone_url":"https://github.com/mosop/crystal.git","svn_url":"https://github.com/mosop/crystal","homepage":"http://crystal-lang.org","size":43985,"stargazers_count":0,"watchers_count":0,"language":"Crystal","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":"crystal-lang:master","ref":"master","sha":"f02b85a089cd1c0e18cb3677d524f0584362054e","user":{"login":"crystal-lang","id":6539796,"avatar_url":"https://avatars.githubusercontent.com/u/6539796?v=3","gravatar_id":"","url":"https://api.github.com/users/crystal-lang","html_url":"https://github.com/crystal-lang","followers_url":"https://api.github.com/users/crystal-lang/followers","following_url":"https://api.github.com/users/crystal-lang/following{/other_user}","gists_url":"https://api.github.com/users/crystal-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/crystal-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crystal-lang/subscriptions","organizations_url":"https://api.github.com/users/crystal-lang/orgs","repos_url":"https://api.github.com/users/crystal-lang/repos","events_url":"https://api.github.com/users/crystal-lang/events{/privacy}","received_events_url":"https://api.github.com/users/crystal-lang/received_events","type":"Organization","site_admin":false},"repo":{"id":6887813,"name":"crystal","full_name":"crystal-lang/crystal","owner":{"login":"crystal-lang","id":6539796,"avatar_url":"https://avatars.githubusercontent.com/u/6539796?v=3","gravatar_id":"","url":"https://api.github.com/users/crystal-lang","html_url":"https://github.com/crystal-lang","followers_url":"https://api.github.com/users/crystal-lang/followers","following_url":"https://api.github.com/users/crystal-lang/following{/other_user}","gists_url":"https://api.github.com/users/crystal-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/crystal-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crystal-lang/subscriptions","organizations_url":"https://api.github.com/users/crystal-lang/orgs","repos_url":"https://api.github.com/users/crystal-lang/repos","events_url":"https://api.github.com/users/crystal-lang/events{/privacy}","received_events_url":"https://api.github.com/users/crystal-lang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/crystal-lang/crystal","description":"The Crystal Programming Language","fork":false,"url":"https://api.github.com/repos/crystal-lang/crystal","forks_url":"https://api.github.com/repos/crystal-lang/crystal/forks","keys_url":"https://api.github.com/repos/crystal-lang/crystal/keys{/key_id}","collaborators_url":"https://api.github.com/repos/crystal-lang/crystal/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/crystal-lang/crystal/teams","hooks_url":"https://api.github.com/repos/crystal-lang/crystal/hooks","issue_events_url":"https://api.github.com/repos/crystal-lang/crystal/issues/events{/number}","events_url":"https://api.github.com/repos/crystal-lang/crystal/events","assignees_url":"https://api.github.com/repos/crystal-lang/crystal/assignees{/user}","branches_url":"https://api.github.com/repos/crystal-lang/crystal/branches{/branch}","tags_url":"https://api.github.com/repos/crystal-lang/crystal/tags","blobs_url":"https://api.github.com/repos/crystal-lang/crystal/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/crystal-lang/crystal/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/crystal-lang/crystal/git/refs{/sha}","trees_url":"https://api.github.com/repos/crystal-lang/crystal/git/trees{/sha}","statuses_url":"https://api.github.com/repos/crystal-lang/crystal/statuses/{sha}","languages_url":"https://api.github.com/repos/crystal-lang/crystal/languages","stargazers_url":"https://api.github.com/repos/crystal-lang/crystal/stargazers","contributors_url":"https://api.github.com/repos/crystal-lang/crystal/contributors","subscribers_url":"https://api.github.com/repos/crystal-lang/crystal/subscribers","subscription_url":"https://api.github.com/repos/crystal-lang/crystal/subscription","commits_url":"https://api.github.com/repos/crystal-lang/crystal/commits{/sha}","git_commits_url":"https://api.github.com/repos/crystal-lang/crystal/git/commits{/sha}","comments_url":"https://api.github.com/repos/crystal-lang/crystal/comments{/number}","issue_comment_url":"https://api.github.com/repos/crystal-lang/crystal/issues/comments{/number}","contents_url":"https://api.github.com/repos/crystal-lang/crystal/contents/{+path}","compare_url":"https://api.github.com/repos/crystal-lang/crystal/compare/{base}...{head}","merges_url":"https://api.github.com/repos/crystal-lang/crystal/merges","archive_url":"https://api.github.com/repos/crystal-lang/crystal/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/crystal-lang/crystal/downloads","issues_url":"https://api.github.com/repos/crystal-lang/crystal/issues{/number}","pulls_url":"https://api.github.com/repos/crystal-lang/crystal/pulls{/number}","milestones_url":"https://api.github.com/repos/crystal-lang/crystal/milestones{/number}","notifications_url":"https://api.github.com/repos/crystal-lang/crystal/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/crystal-lang/crystal/labels{/name}","releases_url":"https://api.github.com/repos/crystal-lang/crystal/releases{/id}","deployments_url":"https://api.github.com/repos/crystal-lang/crystal/deployments","created_at":"2012-11-27T17:32:32Z","updated_at":"2016-06-29T08:47:27Z","pushed_at":"2016-06-29T12:33:19Z","git_url":"git://github.com/crystal-lang/crystal.git","ssh_url":"git@github.com:crystal-lang/crystal.git","clone_url":"https://github.com/crystal-lang/crystal.git","svn_url":"https://github.com/crystal-lang/crystal","homepage":"http://crystal-lang.org","size":64738,"stargazers_count":5258,"watchers_count":5258,"language":"Crystal","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":438,"mirror_url":null,"open_issues_count":240,"forks":438,"open_issues":240,"watchers":5258,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/crystal-lang/crystal/pulls/2928"},"html":{"href":"https://github.com/crystal-lang/crystal/pull/2928"},"issue":{"href":"https://api.github.com/repos/crystal-lang/crystal/issues/2928"},"comments":{"href":"https://api.github.com/repos/crystal-lang/crystal/issues/2928/comments"},"review_comments":{"href":"https://api.github.com/repos/crystal-lang/crystal/pulls/2928/comments"},"review_comment":{"href":"https://api.github.com/repos/crystal-lang/crystal/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/crystal-lang/crystal/pulls/2928/commits"},"statuses":{"href":"https://api.github.com/repos/crystal-lang/crystal/statuses/27f874461d76fda1477d9b69d5767535fed524e3"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":10,"deletions":1,"changed_files":2}}
{"actor":{"display_login":"mosop"}}