From dd9d20af88b5bf7d1f63772942bc0a2538789b26 Mon Sep 17 00:00:00 2001 From: Fabio Rehm Date: Sat, 1 Feb 2014 16:01:02 -0200 Subject: [PATCH] Make sure synced folder types are always symbols This will make sure that plugins that define synced folders after this config object has been finalized won't have trouble because of forgetting to use symbols instead of strings. References https://github.com/fgrehm/vagrant-cachier/issues/76 --- plugins/kernel_v2/config/vm.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/plugins/kernel_v2/config/vm.rb b/plugins/kernel_v2/config/vm.rb index 112785434..9ff14ee46 100644 --- a/plugins/kernel_v2/config/vm.rb +++ b/plugins/kernel_v2/config/vm.rb @@ -150,6 +150,8 @@ module VagrantPlugins options = options.dup options[:guestpath] = guestpath.to_s.gsub(/\/$/, '') options[:hostpath] = hostpath + # Make sure the type is a symbol + options[:type] = options[:type].to_sym if options[:type] @__synced_folders[options[:guestpath]] = options end @@ -324,9 +326,6 @@ module VagrantPlugins options[:type] = :nfs end - # Make sure the type is a symbol - options[:type] = options[:type].to_sym if options[:type] - # Ignore NFS on Windows if options[:type] == :nfs && Vagrant::Util::Platform.windows? options.delete(:type)