diff --git a/CHANGELOG.md b/CHANGELOG.md index 1da8dca7e..aa98b7d21 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,8 @@ BUG FIXES: may be in the box itself. [GH-1061] - NFS synced folders exporting sub-directories of other exported folders now works properly. [GH-785] + - NFS shared folders properly dereference symlinks so that the real path + is used, avoiding mount errors [GH-1101] ## 1.2.3 (July 9, 2013) diff --git a/lib/vagrant/action/builtin/nfs.rb b/lib/vagrant/action/builtin/nfs.rb index 17db963b2..eaaf2899a 100644 --- a/lib/vagrant/action/builtin/nfs.rb +++ b/lib/vagrant/action/builtin/nfs.rb @@ -37,7 +37,9 @@ module Vagrant # Expand the host path, create it if we have to and # store away the folder. - hostpath = Pathname.new(opts[:hostpath]).expand_path(env[:root_path]) + hostpath = Pathname.new(opts[:hostpath]). + expand_path(env[:root_path]). + realpath if !hostpath.directory? && opts[:create] # Host path doesn't exist, so let's create it.