Skip to content

Commit

Permalink
disable share folder if guestpath doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
avokhmin committed Nov 5, 2012
1 parent 8f2d433 commit 8dbdfe3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/providers/virtualbox/action/share_folders.rb
Expand Up @@ -66,7 +66,7 @@ def create_metadata
:name => name, :name => name,
:hostpath => File.expand_path(data[:hostpath], @env[:root_path]), :hostpath => File.expand_path(data[:hostpath], @env[:root_path]),
:transient => data[:transient] :transient => data[:transient]
} } if data[:guestpath] && !data[:guestpath].empty?
end end


@env[:machine].provider.driver.share_folders(folders) @env[:machine].provider.driver.share_folders(folders)
Expand All @@ -87,7 +87,7 @@ def mount_shared_folders


# Go through each folder and mount # Go through each folder and mount
folders.each do |name, data| folders.each do |name, data|
unless data[:guestpath].empty? if data[:guestpath] && !data[:guestpath].empty?
# Guest path specified, so mount the folder to specified point # Guest path specified, so mount the folder to specified point
@env[:ui].info(I18n.t("vagrant.actions.vm.share_folders.mounting_entry", @env[:ui].info(I18n.t("vagrant.actions.vm.share_folders.mounting_entry",
:name => name, :name => name,
Expand Down

0 comments on commit 8dbdfe3

Please sign in to comment.