Fixes #10643: Ensure paths are properly expanded when comparing synced folders

Prior to this commit, the docker action would attempt to compare and
validate synced folders based on their string value, rather than their
actual path value. This commit updates that by path expanding the mounts
when comparing a containers synced folders.
This commit is contained in:
Brian Cain 2019-02-04 11:13:08 -08:00
parent 91e351b937
commit 4c61eaa933
No known key found for this signature in database
GPG Key ID: 9FC4639B2E4510A0
1 changed files with 7 additions and 3 deletions

View File

@ -32,14 +32,18 @@ module VagrantPlugins
fs.each do |_, data|
invalid = false
old = existing.delete(data[:guestpath])
invalid = true if !old
if !old
invalid = true
else
old = File.expand_path(old)
end
if !invalid && old
invalid = true if old != data[:hostpath]
invalid = true if old != File.expand_path(data[:hostpath])
end
if invalid
invalids[data[:guestpath]] = data[:hostpath]
invalids[File.expand_path(data[:guestpath])] = File.expand_path(data[:hostpath])
end
end
end