From 8a1995bec9c37564cb9a31aca2e21baaac5b4f5e Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Wed, 15 Jan 2014 21:22:37 -0800 Subject: [PATCH] synced_folders/rsync: make sure host path ends in "/" --- plugins/synced_folders/rsync/helper.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/synced_folders/rsync/helper.rb b/plugins/synced_folders/rsync/helper.rb index 0afb1c0f2..1fe42b884 100644 --- a/plugins/synced_folders/rsync/helper.rb +++ b/plugins/synced_folders/rsync/helper.rb @@ -19,6 +19,12 @@ module VagrantPlugins hostpath, force: true) end + # Make sure the host path ends with a "/" to avoid creating + # a nested directory... + if !hostpath.end_with?("/") + hostpath += "/" + end + # Connection information username = ssh_info[:username] host = ssh_info[:host]