Fixed and closed #455: meta-content is reset to defaults only on the first application start.
This commit is contained in:
parent
ceb228f937
commit
e04e02ed9c
7 changed files with 58 additions and 44 deletions
|
@ -59,6 +59,8 @@ namespace ScrewTurn.Wiki {
|
|||
private bool bulkUpdating = false;
|
||||
private Dictionary<string, string> configData = null;
|
||||
|
||||
private bool isFirstStart = false;
|
||||
|
||||
private string GetFullPath(string name) {
|
||||
return Path.Combine(host.GetSettingValue(SettingName.PublicDirectory), name);
|
||||
}
|
||||
|
@ -95,6 +97,7 @@ namespace ScrewTurn.Wiki {
|
|||
|
||||
if(!File.Exists(GetFullPath(ConfigFile))) {
|
||||
File.Create(GetFullPath(ConfigFile)).Close();
|
||||
isFirstStart = true;
|
||||
}
|
||||
|
||||
if(!File.Exists(GetFullPath(RecentChangesFile))) {
|
||||
|
@ -1234,6 +1237,14 @@ namespace ScrewTurn.Wiki {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Determines whether the application was started for the first time.
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the application was started for the first time, <c>false</c> otherwise.</returns>
|
||||
public bool IsFirstApplicationStart() {
|
||||
return isFirstStart;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue