Check if data store folder is a directory on Windows works

This commit is contained in:
Mitchell Hashimoto 2011-01-29 20:50:31 -08:00
parent e975956fe1
commit d68b2a6615
1 changed files with 1 additions and 2 deletions

View File

@ -19,13 +19,12 @@ module Vagrant
@file_path = file_path
return if !file_path
raise Errors::DotfileIsDirectory if File.directory?(file_path)
File.open(file_path, "r") do |f|
merge!(JSON.parse(f.read))
end
rescue Errno::ENOENT
clear
rescue Errno::EISDIR
raise Errors::DotfileIsDirectory
end
# Commits any changes to the data to disk. Even if the data