mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Ignore harmless constraint failures
This commit is contained in:
parent
13eef5c695
commit
da521ba3c0
@ -52,9 +52,15 @@ namespace Wabbajack.Common
|
|||||||
|
|
||||||
cmd.Parameters.AddWithValue("@patchSize", patch.Length);
|
cmd.Parameters.AddWithValue("@patchSize", patch.Length);
|
||||||
cmd.Parameters.AddWithValue("@patch", patch.ToArray());
|
cmd.Parameters.AddWithValue("@patch", patch.ToArray());
|
||||||
|
try
|
||||||
|
{
|
||||||
await cmd.ExecuteNonQueryAsync();
|
await cmd.ExecuteNonQueryAsync();
|
||||||
|
}
|
||||||
|
catch (SQLiteException ex)
|
||||||
|
{
|
||||||
|
if (!ex.Message.StartsWith("constraint exception"))
|
||||||
|
throw;
|
||||||
|
}
|
||||||
await patch.CopyToAsync(output);
|
await patch.CopyToAsync(output);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -78,7 +84,16 @@ namespace Wabbajack.Common
|
|||||||
|
|
||||||
cmd.Parameters.AddWithValue("@patchSize", patchStream.Length);
|
cmd.Parameters.AddWithValue("@patchSize", patchStream.Length);
|
||||||
cmd.Parameters.AddWithValue("@patch", patchStream.ToArray());
|
cmd.Parameters.AddWithValue("@patch", patchStream.ToArray());
|
||||||
|
try
|
||||||
|
{
|
||||||
await cmd.ExecuteNonQueryAsync();
|
await cmd.ExecuteNonQueryAsync();
|
||||||
|
}
|
||||||
|
catch (SQLiteException ex)
|
||||||
|
{
|
||||||
|
if (!ex.Message.StartsWith("constraint exception"))
|
||||||
|
throw;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
if (patchOutStream == null) return patchStream.Position;
|
if (patchOutStream == null) return patchStream.Position;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user