{"action":"opened","issue":{"url":"https://api.github.com/repos/golang/go/issues/16793","repository_url":"https://api.github.com/repos/golang/go","labels_url":"https://api.github.com/repos/golang/go/issues/16793/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/16793/comments","events_url":"https://api.github.com/repos/golang/go/issues/16793/events","html_url":"https://github.com/golang/go/issues/16793","id":171950389,"number":16793,"title":"path/filepath: EvalSymlinks is broken for relative paths on Windows","user":{"login":"luan","id":223760,"avatar_url":"https://avatars.githubusercontent.com/u/223760?v=3","gravatar_id":"","url":"https://api.github.com/users/luan","html_url":"https://github.com/luan","followers_url":"https://api.github.com/users/luan/followers","following_url":"https://api.github.com/users/luan/following{/other_user}","gists_url":"https://api.github.com/users/luan/gists{/gist_id}","starred_url":"https://api.github.com/users/luan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luan/subscriptions","organizations_url":"https://api.github.com/users/luan/orgs","repos_url":"https://api.github.com/users/luan/repos","events_url":"https://api.github.com/users/luan/events{/privacy}","received_events_url":"https://api.github.com/users/luan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-18T16:58:04Z","updated_at":"2016-08-18T16:58:04Z","closed_at":null,"body":"This seems to have been introduced with the rework on `filepath.EvalSymlinks` from this issue: #13980 on this commit: c4dda7e5a830e86b597d34483fd7787723b34f2f\r\n\r\n1. What version of Go are you using (`go version`)?\r\n`go version go1.7 windows/amd64`\r\n\r\n2. What operating system and processor architecture are you using (`go env`)?\r\n`windows/amd64`\r\n\r\n3. What did you do?\r\n\r\nThe following code reproduces the problem:\r\n\r\n```go\r\npackage main\r\n\r\nimport (\r\n\t\"fmt\"\r\n\t\"os\"\r\n\t\"path/filepath\"\r\n)\r\n\r\nfunc main() {\r\n\tpath := filepath.Join(\"..\", \"..\", \"foo\")\r\n\terr := os.MkdirAll(path, 0644)\r\n\tif err != nil {\r\n\t\tpanic(err)\r\n\t}\r\n\r\n\tevaldPath, err := filepath.EvalSymlinks(path)\r\n\tif err != nil {\r\n\t\tpanic(err)\r\n\t}\r\n\r\n\tabsPath, err := filepath.Abs(evaldPath)\r\n\tif err != nil {\r\n\t\tpanic(err)\r\n\t}\r\n\r\n\texpectedPath, err := filepath.Abs(path)\r\n\tif err != nil {\r\n\t\tpanic(err)\r\n\t}\r\n\r\n\tfmt.Printf(\"original path: %s\\n\", path)\r\n\tfmt.Printf(\"eval'd path: %s\\n\", absPath)\r\n\tfmt.Printf(\"expected path: %s\\n\", expectedPath)\r\n}\r\n```\r\n\r\n\r\n4. What did you expect to see?\r\n```\r\n> go run main.go\r\noriginal path: ../../foo\r\neval'd path: C:\\gopath\\foo\r\nexpected path: C:\\gopath\\foo\r\n\r\n```\r\n\r\n5. What did you see instead?\r\n\r\n```\r\n> go run main.go\r\noriginal path: ..\\..\\foo\r\neval'd path: C:\\gopath\\src\\pathtest\\src\\gopath\\foo\r\nexpected path: C:\\gopath\\foo\r\n```"}}
{"actor":{"display_login":"luan"}}