{"action":"closed","issue":{"url":"https://api.github.com/repos/elixir-lang/elixir/issues/3155","labels_url":"https://api.github.com/repos/elixir-lang/elixir/issues/3155/labels{/name}","comments_url":"https://api.github.com/repos/elixir-lang/elixir/issues/3155/comments","events_url":"https://api.github.com/repos/elixir-lang/elixir/issues/3155/events","html_url":"https://github.com/elixir-lang/elixir/issues/3155","id":60172266,"number":3155,"title":"Copy a file to itself will remove the file","user":{"login":"AntonFagerberg","id":1349615,"avatar_url":"https://avatars.githubusercontent.com/u/1349615?v=3","gravatar_id":"","url":"https://api.github.com/users/AntonFagerberg","html_url":"https://github.com/AntonFagerberg","followers_url":"https://api.github.com/users/AntonFagerberg/followers","following_url":"https://api.github.com/users/AntonFagerberg/following{/other_user}","gists_url":"https://api.github.com/users/AntonFagerberg/gists{/gist_id}","starred_url":"https://api.github.com/users/AntonFagerberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AntonFagerberg/subscriptions","organizations_url":"https://api.github.com/users/AntonFagerberg/orgs","repos_url":"https://api.github.com/users/AntonFagerberg/repos","events_url":"https://api.github.com/users/AntonFagerberg/events{/privacy}","received_events_url":"https://api.github.com/users/AntonFagerberg/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/elixir-lang/elixir/labels/App:Elixir","name":"App:Elixir","color":"CCCCCC"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/elixir-lang/elixir/milestones/12","html_url":"https://github.com/elixir-lang/elixir/milestones/v1.1.0","labels_url":"https://api.github.com/repos/elixir-lang/elixir/milestones/12/labels","id":785442,"number":12,"title":"v1.1.0","description":"","creator":{"login":"josevalim","id":9582,"avatar_url":"https://avatars.githubusercontent.com/u/9582?v=3","gravatar_id":"","url":"https://api.github.com/users/josevalim","html_url":"https://github.com/josevalim","followers_url":"https://api.github.com/users/josevalim/followers","following_url":"https://api.github.com/users/josevalim/following{/other_user}","gists_url":"https://api.github.com/users/josevalim/gists{/gist_id}","starred_url":"https://api.github.com/users/josevalim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josevalim/subscriptions","organizations_url":"https://api.github.com/users/josevalim/orgs","repos_url":"https://api.github.com/users/josevalim/repos","events_url":"https://api.github.com/users/josevalim/events{/privacy}","received_events_url":"https://api.github.com/users/josevalim/received_events","type":"User","site_admin":false},"open_issues":20,"closed_issues":23,"state":"open","created_at":"2014-09-10T20:33:19Z","updated_at":"2015-05-22T13:09:55Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2015-03-06T23:07:35Z","updated_at":"2015-05-22T13:09:55Z","closed_at":"2015-05-22T13:09:55Z","body":"If a file is copied to itself, it will remove the file and state that the file does not exist. The expected result should (probably) be that the file is preserved as is.\r\n\r\n```elixir\r\niex(1)> File.ls!\r\n[]\r\niex(2)> File.write!(\"test_file\", \":)\")\r\n:ok\r\niex(3)> File.ls!\r\n[\"test_file\"]\r\niex(4)> File.cp(\"test_file\", \"test_file\")\r\n{:error, :enoent}\r\niex(5)> File.ls!\r\n[]\r\n```"}}