synced_folders/smb: hash ID so it is short enough [GH-3219]

This commit is contained in:
Mitchell Hashimoto 2014-03-14 13:03:11 -07:00
parent d01b9ef1df
commit 862d9315ce
2 changed files with 5 additions and 1 deletions

View File

@ -3,6 +3,8 @@
BUG FIXES:
- core: Vagrant won't collide with newer versions of Bundler [GH-3193]
- synced\_folders/smb: IDs of synced folders are hashed to work better
with VMware. [GH-3219]
## 1.5.1 (March 13, 2014)

View File

@ -1,3 +1,4 @@
require "digest/md5"
require "json"
require "log4r"
@ -52,7 +53,8 @@ module VagrantPlugins
folders.each do |id, data|
hostpath = data[:hostpath]
data[:smb_id] ||= "#{machine.id}-#{id.gsub("/", "-")}"
data[:smb_id] ||= Digest::MD5.hexdigest(
"#{machine.id}-#{id.gsub("/", "-")}")
args = []
args << "-path" << hostpath.gsub("/", "\\")