Skip to content

Commit

Permalink
Simplify IsUnc check
Browse files Browse the repository at this point in the history
  • Loading branch information
RWebster-Noble committed Jul 1, 2024
1 parent 8817be5 commit 0f78024
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ function Set-TargetResource
if ($virtualDirectory.count -eq 0)
{
Write-Verbose -Message ($script:localizedData.VerboseSetTargetCreateVirtualDirectory -f $Name)
if ([bool]([System.Uri]$PhysicalPath).IsUnc)
if (([System.Uri]$PhysicalPath).IsUnc)
{
# If physical path is provided using Unc syntax run New-WebVirtualDirectory with -Force flag
New-WebVirtualDirectory -Site $Website `
Expand Down

0 comments on commit 0f78024

Please sign in to comment.