{"action":"opened","number":2,"pull_request":{"url":"https://api.github.com/repos/fs-utils/symlink/pulls/2","id":38993740,"html_url":"https://github.com/fs-utils/symlink/pull/2","diff_url":"https://github.com/fs-utils/symlink/pull/2.diff","patch_url":"https://github.com/fs-utils/symlink/pull/2.patch","issue_url":"https://api.github.com/repos/fs-utils/symlink/issues/2","number":2,"state":"open","locked":false,"title":"Normalise from path to allow symlink to a directory from inside that dir","user":{"login":"dannyfallon","id":1104475,"avatar_url":"https://avatars.githubusercontent.com/u/1104475?v=3","gravatar_id":"","url":"https://api.github.com/users/dannyfallon","html_url":"https://github.com/dannyfallon","followers_url":"https://api.github.com/users/dannyfallon/followers","following_url":"https://api.github.com/users/dannyfallon/following{/other_user}","gists_url":"https://api.github.com/users/dannyfallon/gists{/gist_id}","starred_url":"https://api.github.com/users/dannyfallon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dannyfallon/subscriptions","organizations_url":"https://api.github.com/users/dannyfallon/orgs","repos_url":"https://api.github.com/users/dannyfallon/repos","events_url":"https://api.github.com/users/dannyfallon/events{/privacy}","received_events_url":"https://api.github.com/users/dannyfallon/received_events","type":"User","site_admin":false},"body":"It is currently not possible to symlink to a directory from inside that\r\ndirectory (e.g. symlink /app/myfolder/folder to /app/myfolder). This is because\r\nwe're using path.dirname(to) which will result in the same directory as the from\r\nargument and the result of using path.relative with two paths that are the same\r\nis '' - an empty string.\r\n\r\nBy using path.normalize() you get the correct result: '.', the current directory","created_at":"2015-07-01T15:24:40Z","updated_at":"2015-07-01T15:24:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/fs-utils/symlink/pulls/2/commits","review_comments_url":"https://api.github.com/repos/fs-utils/symlink/pulls/2/comments","review_comment_url":"https://api.github.com/repos/fs-utils/symlink/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fs-utils/symlink/issues/2/comments","statuses_url":"https://api.github.com/repos/fs-utils/symlink/statuses/418986acb08825dd1fb9e86f684432474b2c3242","head":{"label":"dannyfallon:df/allow-self-linking","ref":"df/allow-self-linking","sha":"418986acb08825dd1fb9e86f684432474b2c3242","user":{"login":"dannyfallon","id":1104475,"avatar_url":"https://avatars.githubusercontent.com/u/1104475?v=3","gravatar_id":"","url":"https://api.github.com/users/dannyfallon","html_url":"https://github.com/dannyfallon","followers_url":"https://api.github.com/users/dannyfallon/followers","following_url":"https://api.github.com/users/dannyfallon/following{/other_user}","gists_url":"https://api.github.com/users/dannyfallon/gists{/gist_id}","starred_url":"https://api.github.com/users/dannyfallon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dannyfallon/subscriptions","organizations_url":"https://api.github.com/users/dannyfallon/orgs","repos_url":"https://api.github.com/users/dannyfallon/repos","events_url":"https://api.github.com/users/dannyfallon/events{/privacy}","received_events_url":"https://api.github.com/users/dannyfallon/received_events","type":"User","site_admin":false},"repo":{"id":38378286,"name":"symlink","full_name":"dannyfallon/symlink","owner":{"login":"dannyfallon","id":1104475,"avatar_url":"https://avatars.githubusercontent.com/u/1104475?v=3","gravatar_id":"","url":"https://api.github.com/users/dannyfallon","html_url":"https://github.com/dannyfallon","followers_url":"https://api.github.com/users/dannyfallon/followers","following_url":"https://api.github.com/users/dannyfallon/following{/other_user}","gists_url":"https://api.github.com/users/dannyfallon/gists{/gist_id}","starred_url":"https://api.github.com/users/dannyfallon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dannyfallon/subscriptions","organizations_url":"https://api.github.com/users/dannyfallon/orgs","repos_url":"https://api.github.com/users/dannyfallon/repos","events_url":"https://api.github.com/users/dannyfallon/events{/privacy}","received_events_url":"https://api.github.com/users/dannyfallon/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dannyfallon/symlink","description":"safe symlinking","fork":true,"url":"https://api.github.com/repos/dannyfallon/symlink","forks_url":"https://api.github.com/repos/dannyfallon/symlink/forks","keys_url":"https://api.github.com/repos/dannyfallon/symlink/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dannyfallon/symlink/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dannyfallon/symlink/teams","hooks_url":"https://api.github.com/repos/dannyfallon/symlink/hooks","issue_events_url":"https://api.github.com/repos/dannyfallon/symlink/issues/events{/number}","events_url":"https://api.github.com/repos/dannyfallon/symlink/events","assignees_url":"https://api.github.com/repos/dannyfallon/symlink/assignees{/user}","branches_url":"https://api.github.com/repos/dannyfallon/symlink/branches{/branch}","tags_url":"https://api.github.com/repos/dannyfallon/symlink/tags","blobs_url":"https://api.github.com/repos/dannyfallon/symlink/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dannyfallon/symlink/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dannyfallon/symlink/git/refs{/sha}","trees_url":"https://api.github.com/repos/dannyfallon/symlink/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dannyfallon/symlink/statuses/{sha}","languages_url":"https://api.github.com/repos/dannyfallon/symlink/languages","stargazers_url":"https://api.github.com/repos/dannyfallon/symlink/stargazers","contributors_url":"https://api.github.com/repos/dannyfallon/symlink/contributors","subscribers_url":"https://api.github.com/repos/dannyfallon/symlink/subscribers","subscription_url":"https://api.github.com/repos/dannyfallon/symlink/subscription","commits_url":"https://api.github.com/repos/dannyfallon/symlink/commits{/sha}","git_commits_url":"https://api.github.com/repos/dannyfallon/symlink/git/commits{/sha}","comments_url":"https://api.github.com/repos/dannyfallon/symlink/comments{/number}","issue_comment_url":"https://api.github.com/repos/dannyfallon/symlink/issues/comments{/number}","contents_url":"https://api.github.com/repos/dannyfallon/symlink/contents/{+path}","compare_url":"https://api.github.com/repos/dannyfallon/symlink/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dannyfallon/symlink/merges","archive_url":"https://api.github.com/repos/dannyfallon/symlink/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dannyfallon/symlink/downloads","issues_url":"https://api.github.com/repos/dannyfallon/symlink/issues{/number}","pulls_url":"https://api.github.com/repos/dannyfallon/symlink/pulls{/number}","milestones_url":"https://api.github.com/repos/dannyfallon/symlink/milestones{/number}","notifications_url":"https://api.github.com/repos/dannyfallon/symlink/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dannyfallon/symlink/labels{/name}","releases_url":"https://api.github.com/repos/dannyfallon/symlink/releases{/id}","created_at":"2015-07-01T15:17:08Z","updated_at":"2015-07-01T15:17:09Z","pushed_at":"2015-07-01T15:24:09Z","git_url":"git://github.com/dannyfallon/symlink.git","ssh_url":"git@github.com:dannyfallon/symlink.git","clone_url":"https://github.com/dannyfallon/symlink.git","svn_url":"https://github.com/dannyfallon/symlink","homepage":null,"size":86,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"fs-utils:master","ref":"master","sha":"5d160be7ca627d9abc843d38215ff75ed04662cf","user":{"login":"fs-utils","id":7400405,"avatar_url":"https://avatars.githubusercontent.com/u/7400405?v=3","gravatar_id":"","url":"https://api.github.com/users/fs-utils","html_url":"https://github.com/fs-utils","followers_url":"https://api.github.com/users/fs-utils/followers","following_url":"https://api.github.com/users/fs-utils/following{/other_user}","gists_url":"https://api.github.com/users/fs-utils/gists{/gist_id}","starred_url":"https://api.github.com/users/fs-utils/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fs-utils/subscriptions","organizations_url":"https://api.github.com/users/fs-utils/orgs","repos_url":"https://api.github.com/users/fs-utils/repos","events_url":"https://api.github.com/users/fs-utils/events{/privacy}","received_events_url":"https://api.github.com/users/fs-utils/received_events","type":"Organization","site_admin":false},"repo":{"id":22941491,"name":"symlink","full_name":"fs-utils/symlink","owner":{"login":"fs-utils","id":7400405,"avatar_url":"https://avatars.githubusercontent.com/u/7400405?v=3","gravatar_id":"","url":"https://api.github.com/users/fs-utils","html_url":"https://github.com/fs-utils","followers_url":"https://api.github.com/users/fs-utils/followers","following_url":"https://api.github.com/users/fs-utils/following{/other_user}","gists_url":"https://api.github.com/users/fs-utils/gists{/gist_id}","starred_url":"https://api.github.com/users/fs-utils/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fs-utils/subscriptions","organizations_url":"https://api.github.com/users/fs-utils/orgs","repos_url":"https://api.github.com/users/fs-utils/repos","events_url":"https://api.github.com/users/fs-utils/events{/privacy}","received_events_url":"https://api.github.com/users/fs-utils/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fs-utils/symlink","description":"safe symlinking","fork":false,"url":"https://api.github.com/repos/fs-utils/symlink","forks_url":"https://api.github.com/repos/fs-utils/symlink/forks","keys_url":"https://api.github.com/repos/fs-utils/symlink/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fs-utils/symlink/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fs-utils/symlink/teams","hooks_url":"https://api.github.com/repos/fs-utils/symlink/hooks","issue_events_url":"https://api.github.com/repos/fs-utils/symlink/issues/events{/number}","events_url":"https://api.github.com/repos/fs-utils/symlink/events","assignees_url":"https://api.github.com/repos/fs-utils/symlink/assignees{/user}","branches_url":"https://api.github.com/repos/fs-utils/symlink/branches{/branch}","tags_url":"https://api.github.com/repos/fs-utils/symlink/tags","blobs_url":"https://api.github.com/repos/fs-utils/symlink/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fs-utils/symlink/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fs-utils/symlink/git/refs{/sha}","trees_url":"https://api.github.com/repos/fs-utils/symlink/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fs-utils/symlink/statuses/{sha}","languages_url":"https://api.github.com/repos/fs-utils/symlink/languages","stargazers_url":"https://api.github.com/repos/fs-utils/symlink/stargazers","contributors_url":"https://api.github.com/repos/fs-utils/symlink/contributors","subscribers_url":"https://api.github.com/repos/fs-utils/symlink/subscribers","subscription_url":"https://api.github.com/repos/fs-utils/symlink/subscription","commits_url":"https://api.github.com/repos/fs-utils/symlink/commits{/sha}","git_commits_url":"https://api.github.com/repos/fs-utils/symlink/git/commits{/sha}","comments_url":"https://api.github.com/repos/fs-utils/symlink/comments{/number}","issue_comment_url":"https://api.github.com/repos/fs-utils/symlink/issues/comments{/number}","contents_url":"https://api.github.com/repos/fs-utils/symlink/contents/{+path}","compare_url":"https://api.github.com/repos/fs-utils/symlink/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fs-utils/symlink/merges","archive_url":"https://api.github.com/repos/fs-utils/symlink/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fs-utils/symlink/downloads","issues_url":"https://api.github.com/repos/fs-utils/symlink/issues{/number}","pulls_url":"https://api.github.com/repos/fs-utils/symlink/pulls{/number}","milestones_url":"https://api.github.com/repos/fs-utils/symlink/milestones{/number}","notifications_url":"https://api.github.com/repos/fs-utils/symlink/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fs-utils/symlink/labels{/name}","releases_url":"https://api.github.com/repos/fs-utils/symlink/releases{/id}","created_at":"2014-08-14T04:47:36Z","updated_at":"2015-05-08T02:16:01Z","pushed_at":"2015-06-05T05:50:53Z","git_url":"git://github.com/fs-utils/symlink.git","ssh_url":"git@github.com:fs-utils/symlink.git","clone_url":"https://github.com/fs-utils/symlink.git","svn_url":"https://github.com/fs-utils/symlink","homepage":null,"size":160,"stargazers_count":4,"watchers_count":4,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fs-utils/symlink/pulls/2"},"html":{"href":"https://github.com/fs-utils/symlink/pull/2"},"issue":{"href":"https://api.github.com/repos/fs-utils/symlink/issues/2"},"comments":{"href":"https://api.github.com/repos/fs-utils/symlink/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/fs-utils/symlink/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/fs-utils/symlink/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fs-utils/symlink/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/fs-utils/symlink/statuses/418986acb08825dd1fb9e86f684432474b2c3242"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":1,"deletions":1,"changed_files":1}}