mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-24 20:57:19 -08:00
enhance: do NOT save preference.json while loading
This commit is contained in:
parent
88fb43e4fb
commit
7b2da25c0b
1 changed files with 3 additions and 0 deletions
|
@ -431,6 +431,9 @@ namespace SourceGit.ViewModels
|
||||||
|
|
||||||
public void Save()
|
public void Save()
|
||||||
{
|
{
|
||||||
|
if (_isLoading)
|
||||||
|
return;
|
||||||
|
|
||||||
var file = Path.Combine(Native.OS.DataDir, "preference.json");
|
var file = Path.Combine(Native.OS.DataDir, "preference.json");
|
||||||
var data = JsonSerializer.Serialize(this, JsonCodeGen.Default.Preference);
|
var data = JsonSerializer.Serialize(this, JsonCodeGen.Default.Preference);
|
||||||
File.WriteAllText(file, data);
|
File.WriteAllText(file, data);
|
||||||
|
|
Loading…
Reference in a new issue