Skip to content

Commit

Permalink
Speedup restore as we don't need to reassembly the full nupkg if the …
Browse files Browse the repository at this point in the history
…checksum is already verified to be ok.
  • Loading branch information
peters committed Jun 27, 2020
1 parent 3beb862 commit 0539b4d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Snap/Core/SnapPackageManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,8 @@ async Task<bool> ReassembleAsync()
var snapReleases = new List<SnapRelease>();

var mostRecentDeltaSnapRelease = snapAppChannelReleases.GetDeltaReleases().LastOrDefault();
if (mostRecentDeltaSnapRelease != null)
if (restoreSummary.ChecksumSummary.Any(x => !x.Ok)
&& mostRecentDeltaSnapRelease != null)
{
var mostRecentFullSnapRelease = restoreSummary.ChecksumSummary.SingleOrDefault(x =>
x.Ok
Expand Down

0 comments on commit 0539b4d

Please sign in to comment.