Decrypt form: remove debug window
This commit is contained in:
parent
01de928b7a
commit
6ba8c0ca91
5 changed files with 132 additions and 151 deletions
|
|
@ -248,23 +248,29 @@ namespace FileManager
|
|||
// Directory.Delete(AppDir);
|
||||
//}
|
||||
|
||||
|
||||
libationFilesPathCache = null;
|
||||
|
||||
|
||||
var startingContents = File.ReadAllText(APPSETTINGS_JSON);
|
||||
var jObj = JObject.Parse(startingContents);
|
||||
|
||||
jObj[LIBATION_FILES_KEY] = directory;
|
||||
|
||||
var endingContents = JsonConvert.SerializeObject(jObj, Formatting.Indented);
|
||||
if (startingContents != endingContents)
|
||||
{
|
||||
try { Serilog.Log.Logger.Information("Libation files changed {@DebugInfo}", new { APPSETTINGS_JSON, LIBATION_FILES_KEY, directory }); }
|
||||
catch { }
|
||||
File.WriteAllText(APPSETTINGS_JSON, endingContents);
|
||||
}
|
||||
if (startingContents == endingContents)
|
||||
return true;
|
||||
|
||||
try
|
||||
{
|
||||
Serilog.Log.Logger.Information("Libation files changed {@DebugInfo}", new { APPSETTINGS_JSON, LIBATION_FILES_KEY, directory });
|
||||
}
|
||||
catch { }
|
||||
|
||||
// now it's set in the file again but no settings have moved yet
|
||||
File.WriteAllText(APPSETTINGS_JSON, endingContents);
|
||||
|
||||
//// attempting this will try to change the settings file which has not yet been moved
|
||||
// var logPath = Path.Combine(LibationFiles, "Log.log");
|
||||
// SetWithJsonPath("Serilog.WriteTo[1].Args", "path", logPath);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue