Fixed bug in automatic fallback to default theme.

This commit is contained in:
Dario Solera 2011-01-06 14:17:33 +00:00
parent c639774f73
commit 753c1410d1
2 changed files with 5 additions and 5 deletions

View file

@ -850,9 +850,9 @@ namespace ScrewTurn.Wiki {
/// <param name="nspace">The namespace (<c>null</c> for the root).</param>
/// <returns>The path of the theme.</returns>
public static string GetThemePath(string nspace) {
string path = ThemesDirectoryName + "/" + GetTheme(nspace) + "/";
if(!Directory.Exists(path)) return ThemesDirectoryName + "/Default/";
else return path;
string theme = GetTheme(nspace);
if(!Directory.Exists(ThemesDirectory + theme)) return ThemesDirectoryName + "/Default/";
else return ThemesDirectoryName + "/" + theme + "/";
}
/// <summary>