From 766b97c47990516f78509769decda206e41fcb51 Mon Sep 17 00:00:00 2001 From: Mikhail Zholobov Date: Sun, 2 Apr 2017 13:17:46 +0200 Subject: [PATCH] Replace special characters in synced folder id That fixes invalid share names in Windows guests, where backward slash character is used as a path separator. --- lib/vagrant-parallels/synced_folder.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/vagrant-parallels/synced_folder.rb b/lib/vagrant-parallels/synced_folder.rb index 938f0a97..6bb784b1 100644 --- a/lib/vagrant-parallels/synced_folder.rb +++ b/lib/vagrant-parallels/synced_folder.rb @@ -105,7 +105,8 @@ def driver(machine) end def os_friendly_id(id) - id.gsub(/[\/:]/,'_').sub(/^_/, '') + # Replace chars *, ", :, <, >, ?, |, /, \ + id.gsub(/[*":<>?|\/\\]/,'_').sub(/^_/, '') end end end