core: fix file URLs from cygwin on Windows [GH-5747]

This commit is contained in:
Mitchell Hashimoto 2015-11-23 09:30:27 -08:00
parent 104066c678
commit 4e1ba3a027
2 changed files with 3 additions and 1 deletions

View File

@ -72,6 +72,7 @@ BUG FIXES:
retry from scratch [GH-4479] retry from scratch [GH-4479]
- core: line numbers show properly in Vagrantfile syntax errors - core: line numbers show properly in Vagrantfile syntax errors
on Windows [GH-6445] on Windows [GH-6445]
- commands/box: add command with `~` paths on Windows works [GH-5747]
- commands/box: the update command supports CA settings [GH-4473] - commands/box: the update command supports CA settings [GH-4473]
- commands/box: removing all versions and providers of a box will properly - commands/box: removing all versions and providers of a box will properly
clean all directories in `~/.vagrant.d/boxes` [GH-3570] clean all directories in `~/.vagrant.d/boxes` [GH-3570]

View File

@ -381,7 +381,8 @@ module Vagrant
@logger.info("URL is a file or protocol not found and assuming file.") @logger.info("URL is a file or protocol not found and assuming file.")
file_path = File.expand_path(url) file_path = File.expand_path(url)
file_path = Util::Platform.cygwin_windows_path(file_path) file_path = Util::Platform.cygwin_windows_path(file_path)
url = "file:#{file_path}" file_path = file_path.gsub("\\", "/")
url = "file://#{file_path}"
end end
# If the temporary path exists, verify it is not too old. If its # If the temporary path exists, verify it is not too old. If its