Skip to content

Commit

Permalink
forgot to check for file (#110)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattpannella committed Feb 6, 2023
1 parent 82ea8f8 commit 459fe9a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions models/Core.cs
Expand Up @@ -422,9 +422,13 @@ private void BuildInstanceJSONs(bool overwrite = true)
{
WriteIndented = true
};
string json = JsonSerializer.Serialize<Analogue.SimpleInstanceJSON>(instancejson, options);
_writeMessage("Saving " + jsonFileName);
File.WriteAllText(Path.Combine(UpdateDirectory, packager.output, jsonFileName), json);
if(File.Exists(Path.Combine(UpdateDirectory, packager.output, jsonFileName))) {
_writeMessage(jsonFileName + " already exists.");
} else {
string json = JsonSerializer.Serialize<Analogue.SimpleInstanceJSON>(instancejson, options);
_writeMessage("Saving " + jsonFileName);
File.WriteAllText(Path.Combine(UpdateDirectory, packager.output, jsonFileName), json);
}
} catch(Exception e) {
_writeMessage("Unable to build " + dirName);
}
Expand Down
2 changes: 1 addition & 1 deletion pocket_updater.csproj
Expand Up @@ -6,7 +6,7 @@
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Version>2.13.0</Version>
<Version>2.13.1</Version>
<Description>Keep your Analogue Pocket up to date</Description>
<Copyright>2022 Matt Pannella</Copyright>
<Authors>Matt Pannella</Authors>
Expand Down

0 comments on commit 459fe9a

Please sign in to comment.