Check if data store folder is a directory on Windows works
This commit is contained in:
parent
e975956fe1
commit
d68b2a6615
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue