From 2b47478d6a66b1a03348ddf564636792a0d8232a Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Fri, 11 Apr 2014 16:21:12 -0700 Subject: [PATCH] core: all symlinks for synced folders are expanded [GH-3444] --- CHANGELOG.md | 2 ++ lib/vagrant/action/builtin/synced_folders.rb | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0499342f4..59b32f67a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,8 @@ BUG FIXES: code zero. [GH-3420] - core: Adding a box from a network share has nice error on Windows. [GH-3279] - core: Setting an ID on a provisioner now works. [GH-3424] + - core: All synced folder paths containing symlinks are fully + expanded before sharing. [GH-3444] - commands/package: Nice error if includes contain symlinks. [GH-3200] - commands/rsync-auto: Don't crash if the machine can't be communicated to. [GH-3419] diff --git a/lib/vagrant/action/builtin/synced_folders.rb b/lib/vagrant/action/builtin/synced_folders.rb index 7b34bdfe2..f92e07a52 100644 --- a/lib/vagrant/action/builtin/synced_folders.rb +++ b/lib/vagrant/action/builtin/synced_folders.rb @@ -33,7 +33,9 @@ module Vagrant # it does not exist on host folders.each do |_, fs| fs.each do |id, data| - data[:hostpath] = File.expand_path(data[:hostpath], env[:root_path]) + data[:hostpath] = File.expand_path( + data[:hostpath], env[:root_path]) + data[:hostpath] = File.realpath(data[:hostpath]) # Create the hostpath if it doesn't exist and we've been told to if !File.directory?(data[:hostpath]) && data[:create]