From 3c44ab7cf282ca726eaf547f38ad2255b4059245 Mon Sep 17 00:00:00 2001 From: Mikhail Zholobov Date: Sun, 2 Apr 2017 13:05:23 +0200 Subject: [PATCH] Escape backward slashes in vbox share name That fixes invalid share names in Windows guests, where backward slash character is used as a path separator. --- plugins/providers/virtualbox/synced_folder.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/providers/virtualbox/synced_folder.rb b/plugins/providers/virtualbox/synced_folder.rb index 49d403e44..2ce0f82c1 100644 --- a/plugins/providers/virtualbox/synced_folder.rb +++ b/plugins/providers/virtualbox/synced_folder.rb @@ -85,7 +85,7 @@ module VagrantPlugins end def os_friendly_id(id) - id.gsub(/[\/]/,'_').sub(/^_/, '') + id.gsub(/[\/\\]/,'_').sub(/^_/, '') end # share_folders sets up the shared folder definitions on the