Skip to content

Commit 0f935a2

Browse files
authored
Merge pull request #336 from puppetlabs/MODULES-11188-physical_path_fixes
(MODULES-11188) Fix physicalPath on apps and sites
2 parents 56e9b46 + 4ab8f4b commit 0f935a2

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

lib/puppet/provider/templates/webadministration/_getwebsites.ps1.erb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ Get-WebSite | % {
88
}
99

1010
$SiteEntityPath = "IIS:\\Sites\${name}"
11-
$SitePhysicalPath = Get-ItemProperty -Path $SiteEntityPath -Name PhysicalPath
11+
$SiteEntityPhysicalPath = Get-ItemProperty -Path $SiteEntityPath -Name physicalPath
1212

13-
if ($SitePhysicalPath.physicalpath.EndsWith('/')){
14-
$null = Set-ItemProperty -Path $SiteEntityPath -Name PhysicalPath -Value $SitePhysicalPath.physicalpath.TrimEnd('/') -Force
13+
if ($SiteEntityPhysicalPath.EndsWith('/')){
14+
$null = Set-ItemProperty -Path $SiteEntityPath -Name PhysicalPath -Value $SiteEntityPhysicalPath.TrimEnd('/') -Force
1515
}
1616

1717
$authenticationTypes = @(

lib/puppet/provider/templates/webadministration/getapps.ps1.erb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ Get-WebApplication | % {
44
$name = [string]$pattern.replace($_.Path,'',1)
55
$site = [string]$_.ItemXPath.split("'")[1]
66

7-
$SiteEntityPath = "IIS:\\Sites\${site}"
8-
$SitePhysicalPath = Get-ItemProperty -Path $SiteEntityPath -Name PhysicalPath
7+
$AppEntityPath = "IIS:\\Sites\${site}\${name}"
8+
$AppEntityPhysicalPath = Get-ItemProperty -Path $AppEntityPath -Name physicalPath
99

10-
if ($SitePhysicalPath.physicalpath.EndsWith('/')){
11-
$null = Set-ItemProperty -Path $SiteEntityPath -Name PhysicalPath -Value $SitePhysicalPath.physicalpath.TrimEnd('/') -Force
10+
if ($AppEntityPhysicalPath.EndsWith('/')){
11+
$null = Set-ItemProperty -Path $AppEntityPath -Name physicalPath -Value $AppEntityPhysicalPath.TrimEnd('/') -Force
1212
}
1313

1414
$sslFlags = @()

0 commit comments

Comments
 (0)