{"action":"opened","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/26716","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/26716/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/26716/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/26716/events","html_url":"https://github.com/rust-lang/rust/issues/26716","id":92434103,"number":26716,"title":"fs::create_dir_all fails for directory junctions on Windows","user":{"login":"alexcrichton","id":64996,"avatar_url":"https://avatars.githubusercontent.com/u/64996?v=3","gravatar_id":"","url":"https://api.github.com/users/alexcrichton","html_url":"https://github.com/alexcrichton","followers_url":"https://api.github.com/users/alexcrichton/followers","following_url":"https://api.github.com/users/alexcrichton/following{/other_user}","gists_url":"https://api.github.com/users/alexcrichton/gists{/gist_id}","starred_url":"https://api.github.com/users/alexcrichton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexcrichton/subscriptions","organizations_url":"https://api.github.com/users/alexcrichton/orgs","repos_url":"https://api.github.com/users/alexcrichton/repos","events_url":"https://api.github.com/users/alexcrichton/events{/privacy}","received_events_url":"https://api.github.com/users/alexcrichton/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-01T16:55:33Z","updated_at":"2015-07-01T16:55:33Z","closed_at":null,"body":"First reported in https://github.com/rust-lang/cargo/issues/1749, it looks like if an intermediate directory is a junction on Windows then `fs::create_dir_all` will fail. Unfortunately the standard library doesn't provide away to create a junction, but a setup like this should work:\r\n\r\n```sh\r\nmkdir foo\r\nmklink /J bar foo\r\n```\r\n\r\n```rust\r\nuse std::fs;\r\nfs::create_dir_all(\"bar/test\").unwrap() // this fails\r\n```"}}