diff --git a/lib/vagrant/action/vm/share_folders.rb b/lib/vagrant/action/vm/share_folders.rb index 7975aabbe..c4ce6cc14 100644 --- a/lib/vagrant/action/vm/share_folders.rb +++ b/lib/vagrant/action/vm/share_folders.rb @@ -51,7 +51,8 @@ module Vagrant @env.ui.info I18n.t("vagrant.actions.vm.share_folders.mounting") @env["vm"].ssh.execute do |ssh| - shared_folders.each do |name, data| + # short guestpaths first, so we don't step on ourselves + shared_folders.sort_by {|name, data| data[:guestpath].length}.each do |name, data| if data[:guestpath] # Guest path specified, so mount the folder to specified point @env.ui.info(I18n.t("vagrant.actions.vm.share_folders.mounting_entry",