Automatic fallback to Default theme if selected theme does not exist.

This commit is contained in:
Dario Solera 2011-01-05 08:46:56 +00:00
parent 75798de63f
commit 318bc854b1
3 changed files with 14 additions and 11 deletions

View file

@ -832,7 +832,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) {
return ThemesDirectoryName + "/" + GetTheme(nspace) + "/";
string path = ThemesDirectoryName + "/" + GetTheme(nspace) + "/";
if(!Directory.Exists(path)) return ThemesDirectoryName + "/Default/";
else return path;
}
/// <summary>