Skip to content

Commit b2409bb

Browse files
authored
Merge pull request #149 from blitzmann/issue148
Fix issue where Join-Path doesn't work if using a drive that doesn't …
2 parents 017fa85 + a2e71a4 commit b2409bb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

functions/clone/New-DcnClone.ps1

+2-2
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@
352352
}
353353

354354
# Setup access path location
355-
$accessPath = Join-PSFPath -Path $Destination -Child $mountDirectory
355+
$accessPath = [System.IO.Path]::Combine($Destination, $mountDirectory)
356356

357357
# Check if access path is already present
358358
if ($PSCmdlet.ShouldProcess($accessPath, "Testing existence access path $accessPath and create it")) {
@@ -382,7 +382,7 @@
382382
}
383383

384384
# Check if the clone vhd does not yet exist
385-
$clonePath = Join-PSFPath -Path $Destination -Child "$($CloneName).vhdx"
385+
$clonePath = [System.IO.Path]::Combine($Destination, "$($CloneName).vhdx")
386386
if ($computer.IsLocalhost) {
387387
if (Test-Path -Path "$($clonePath)" -Credential $DestinationCredential) {
388388
Stop-PSFFunction -Message "Clone $CloneName already exists" -Target $accessPath -Continue

0 commit comments

Comments
 (0)