Class: VagrantPlugins::VagrantHanewinNfs::Config

Inherits:
Kernel_V2::VMConfig
  • Object
show all
Defined in:
lib/vagrant-hanewin-nfs/config.rb

Instance Method Summary collapse

Instance Method Details

#finalize!Object



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/vagrant-hanewin-nfs/config.rb', line 7

def finalize!
  switch_back = {}

  @__synced_folders.each do |id, options|
    if (options[:nfs] || options[:type] == :nfs || options[:type] == "nfs") && Vagrant::Util::Platform.windows?
      switch_back[id] = true
    end
  end

  super

  @__synced_folders.each do |id, options|
    if options[:type] != :nfs && !switch_back[id].nil?
      options[:type] = :nfs
    end
  end
end