Class: VagrantPlugins::ProviderVirtualBox::Action::ShareFolders
- Inherits:
-
Object
- Object
- VagrantPlugins::ProviderVirtualBox::Action::ShareFolders
show all
- Includes:
- VagrantWindows::Helper
- Defined in:
- lib/vagrant-windows/monkey_patches/plugins/providers/virtualbox/action/share_folders.rb
Instance Method Summary
collapse
#wait_if_rebooting, #win_friendly_path, #win_friendly_share_id
Instance Method Details
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
# File 'lib/vagrant-windows/monkey_patches/plugins/providers/virtualbox/action/share_folders.rb', line 12
def create_metadata
unless @env[:machine].is_windows?
original_create_metadata
else
@env[:ui].info I18n.t("vagrant.actions.vm.share_folders.creating")
folders = []
shared_folders.each do |id, data|
hostpath = File.expand_path(data[:hostpath], @env[:root_path])
hostpath = Vagrant::Util::Platform.cygwin_windows_path(hostpath)
folder_name = win_friendly_share_id(id.gsub(/[\/\/]/,'_').sub(/^_/, ''))
folders << {
:name => folder_name,
:hostpath => hostpath,
:transient => data[:transient]
}
end
@env[:machine].provider.driver.share_folders(folders)
end
end
|
10
|
# File 'lib/vagrant-windows/monkey_patches/plugins/providers/virtualbox/action/share_folders.rb', line 10
alias_method :original_create_metadata, :create_metadata
|