From 162239d2cd84b73ad4d014fc66eae93f9a482c3c Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sun, 7 Apr 2013 13:46:20 -0700 Subject: [PATCH] Expand file paths when adding boxes in Cygwin --- lib/vagrant/action/builtin/box_add.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/vagrant/action/builtin/box_add.rb b/lib/vagrant/action/builtin/box_add.rb index 9003baa22..020a90eac 100644 --- a/lib/vagrant/action/builtin/box_add.rb +++ b/lib/vagrant/action/builtin/box_add.rb @@ -21,7 +21,9 @@ module Vagrant url = env[:box_url] if url !~ /^[a-z0-9]+:.*$/i @logger.info("No protocol found on box URL, assuming file:") - url = "file:#{File.expand_path(url)}" + file_path = File.expand_path(url) + file_path = Util::Platform.cygwin_windows_path(file_path) + url = "file:#{file_path}" end downloader_options = {}