Skip to content

Commit 8269421

Browse files
authored
Merge pull request BlogEngine#95 from markmcavoy/MissingMasterFileFix
Validate Site.Master exists in theme folder
2 parents 0a85967 + 65b0b61 commit 8269421

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

BlogEngine/BlogEngine.Core/Web/Controls/BlogBasePage.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,14 @@ string GetSiteMaster()
279279
return path;
280280
}
281281

282-
return string.Format("{0}Custom/Themes/{1}/site.master", Utils.ApplicationRelativeWebRoot,
283-
BlogSettings.Instance.GetThemeWithAdjustments(null));
282+
var siteMaster = string.Format("{0}Custom/Themes/{1}/site.master", Utils.ApplicationRelativeWebRoot,
283+
BlogSettings.Instance.GetThemeWithAdjustments(null));
284+
285+
if (System.IO.File.Exists(Server.MapPath(siteMaster)))
286+
return siteMaster;
287+
else
288+
return string.Format("{0}Custom/Themes/Standard/site.master", Utils.ApplicationRelativeWebRoot);
289+
284290
}
285291
}
286292
}

0 commit comments

Comments
 (0)