Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Aragas committed Oct 2, 2023
1 parent 44e7ed5 commit e009683
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/BUTR.CrashReportServer/Services/DatabaseMigrator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,16 @@ await Parallel.ForEachAsync(Enumerable.Range(0, 4), options, async (_, ct2) =>
decompressed.Seek(0, SeekOrigin.Begin);
decompressed.Seek(0, SeekOrigin.Begin);
var (valid, id, version, json) = await CrashReportRawParser.TryReadCrashReportDataAsync(PipeReader.Create(decompressed));
var valid = false;
var version = 0;
try
{
var (valid2, id, version2, json) = await CrashReportRawParser.TryReadCrashReportDataAsync(PipeReader.Create(decompressed));
valid = valid2;
version = version2;
}
catch (Exception) { }
if (valid)
{
sb.AppendLine($"""
Expand All @@ -85,6 +94,8 @@ DELETE FROM id_entity
WHERE file_id = '{entity.Id.FileId}';
DELETE FROM file_entity
WHERE file_id = '{entity.Id.FileId}';
DELETE FROM json_entity
WHERE file_id = '{entity.Id.FileId}';
""");
}
}
Expand Down

0 comments on commit e009683

Please sign in to comment.