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:
parent
91e351b937
commit
4c61eaa933
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue