Skip to content

Commit

Permalink
Fixed settings file conversion from xml to json
Browse files Browse the repository at this point in the history
  • Loading branch information
dukus committed Aug 16, 2018
1 parent 56ad825 commit fd4d99f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CameraControl.Core/Classes/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1303,7 +1303,7 @@ public Settings Load()
{
Directory.CreateDirectory(Path.GetDirectoryName(ConfigFile));
}
if (File.Exists(ConfigFile))
if (File.Exists(ConfigFile) || File.Exists(ConfigFile.Replace(".json", ".xml")))
{
settings = LoadSettings(ConfigFile, settings);
}
Expand Down Expand Up @@ -1458,7 +1458,7 @@ public void Save()
//serializer.Serialize(writer, this);
//writer.Close();

var json = JsonConvert.SerializeObject(this);
var json = JsonConvert.SerializeObject(this, Formatting.Indented);
File.WriteAllText(ConfigFile, json);
// save preset in separated files
foreach (var cameraPreset in this.CameraPresets)
Expand Down

0 comments on commit fd4d99f

Please sign in to comment.