lib/vagrant-windows/scripts/mount_volume.ps1.erb in vagrant-windows-0.0.3 vs lib/vagrant-windows/scripts/mount_volume.ps1.erb in vagrant-windows-0.1.0

- old
+ new

@@ -2,11 +2,17 @@ function Test-ReparsePoint([string]$path) { $file = Get-Item $path -Force -ea 0 return [bool]($file.Attributes -band [IO.FileAttributes]::ReparsePoint) } + $MountPoint = [System.IO.Path]::GetFullPath("<%= options[:mount_point] %>") $ShareName = "<%= options[:name] %>" + +# https://github.com/BIAINC/vagrant-windows/issues/4 +# Not sure why this works, but it does. + +& net use $ShareName Write-Host "Attempting to mount $ShareName to $MountPoint" if( (Test-Path "$MountPoint") -and (Test-ReparsePoint "$MountPoint") ) { Write-Host "Junction already exists, so I will delete it" \ No newline at end of file