core: MachineIndex sets paths to nil if empty

This commit is contained in:
Mitchell Hashimoto 2014-04-16 09:52:57 -07:00
parent 98af7c7992
commit 901d3c3558
1 changed files with 4 additions and 0 deletions

View File

@ -392,6 +392,10 @@ module Vagrant
@updated_at = raw["updated_at"]
@extra_data = raw["extra_data"] || {}
# Be careful with the paths
@local_data_path = nil if @local_data_path == ""
@vagrantfile_path = nil if @vagrantfile_path == ""
# Convert to proper types
@local_data_path = Pathname.new(@local_data_path) if @local_data_path
@vagrantfile_path = Pathname.new(@vagrantfile_path) if @vagrantfile_path