Skip to content

Commit

Permalink
Update to Google.Protobuf 3.22.0 and fix file creation bug
Browse files Browse the repository at this point in the history
Previously when saving module/kit files over an existing file, if the new file was longer it would have leftover data from the old file.
  • Loading branch information
jskeet committed Feb 17, 2023
1 parent 503f795 commit b0bf0f1
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion Drums/VDrumExplorer.Model/VDrumExplorer.Model.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Google.Protobuf" Version="3.21.0" />
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="1.1.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="System.Linq.Async" Version="4.1.1" />
Expand Down
1 change: 1 addition & 0 deletions Drums/VDrumExplorer.Proto/VDrumExplorer.Proto.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

<ItemGroup>
<ProjectReference Include="..\VDrumExplorer.Model\VDrumExplorer.Model.csproj" />
<PackageReference Include="Google.Protobuf" Version="3.22.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ private void SaveFileImpl(string? defaultFileName)
}
FileName = fileName;
}
using (var stream = File.OpenWrite(fileName))
using (var stream = File.Create(fileName))
{
SaveToStream(stream);
}
Expand Down
Binary file modified Drums/td27-v2.vdrum
Binary file not shown.

0 comments on commit b0bf0f1

Please sign in to comment.