Do not mount folders with an empty guest path

This commit is contained in:
Giacomo Lozito 2015-10-25 18:21:28 +00:00
parent d1a0d80cd7
commit 79e08cf2d9

View File

@ -63,9 +63,11 @@ module VagrantPlugins
# Only mount folders that have a guest path specified.
mount_folders = {}
folders.each do |id, opts|
mount_folders[id] = opts.dup if opts[:guestpath]
# merge common options if not given
mount_folders[id].merge!(version: '9p2000.L') { |_k, ov, _nv| ov }
if opts[:guestpath] && ! opts[:guestpath].empty?
mount_folders[id] = opts.dup
# merge common options if not given
mount_folders[id].merge!(version: '9p2000.L') { |_k, ov, _nv| ov }
end
end
# Mount the actual folder
machine.guest.capability(