{"action":"created","issue":{"url":"https://api.github.com/repos/mitchellh/vagrant/issues/5156","labels_url":"https://api.github.com/repos/mitchellh/vagrant/issues/5156/labels{/name}","comments_url":"https://api.github.com/repos/mitchellh/vagrant/issues/5156/comments","events_url":"https://api.github.com/repos/mitchellh/vagrant/issues/5156/events","html_url":"https://github.com/mitchellh/vagrant/issues/5156","id":53907735,"number":5156,"title":"File provisioner copies folders as empty files","user":{"login":"bvalerius","id":206856,"avatar_url":"https://avatars.githubusercontent.com/u/206856?v=3","gravatar_id":"","url":"https://api.github.com/users/bvalerius","html_url":"https://github.com/bvalerius","followers_url":"https://api.github.com/users/bvalerius/followers","following_url":"https://api.github.com/users/bvalerius/following{/other_user}","gists_url":"https://api.github.com/users/bvalerius/gists{/gist_id}","starred_url":"https://api.github.com/users/bvalerius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bvalerius/subscriptions","organizations_url":"https://api.github.com/users/bvalerius/orgs","repos_url":"https://api.github.com/users/bvalerius/repos","events_url":"https://api.github.com/users/bvalerius/events{/privacy}","received_events_url":"https://api.github.com/users/bvalerius/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-09T19:53:49Z","updated_at":"2015-01-09T20:45:15Z","closed_at":null,"body":"When provisioning with the file provisioner and giving it a directory as the source it creates an empty file on the destination. This is because provisioners/file./config.rb should maybe use File.file? instead of File.exists?\r\n\r\nThis should go back at least as far as v1.3.0"},"comment":{"url":"https://api.github.com/repos/mitchellh/vagrant/issues/comments/69396163","html_url":"https://github.com/mitchellh/vagrant/issues/5156#issuecomment-69396163","issue_url":"https://api.github.com/repos/mitchellh/vagrant/issues/5156","id":69396163,"user":{"login":"bvalerius","id":206856,"avatar_url":"https://avatars.githubusercontent.com/u/206856?v=3","gravatar_id":"","url":"https://api.github.com/users/bvalerius","html_url":"https://github.com/bvalerius","followers_url":"https://api.github.com/users/bvalerius/followers","following_url":"https://api.github.com/users/bvalerius/following{/other_user}","gists_url":"https://api.github.com/users/bvalerius/gists{/gist_id}","starred_url":"https://api.github.com/users/bvalerius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bvalerius/subscriptions","organizations_url":"https://api.github.com/users/bvalerius/orgs","repos_url":"https://api.github.com/users/bvalerius/repos","events_url":"https://api.github.com/users/bvalerius/events{/privacy}","received_events_url":"https://api.github.com/users/bvalerius/received_events","type":"User","site_admin":false},"created_at":"2015-01-09T20:45:15Z","updated_at":"2015-01-09T20:45:15Z","body":"Hmm, I see now in Communicator#upload there is a check to see if the source is a directory, and if so it uses scp.upload! with recursive option set to true. I will test this more to be sure it's not my own mistake. I closed the pull request for now."}}