Economy command: drop the untested second fingerprint check before the swap
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
7f3b06222d
commit
7c9a970c81
1 changed files with 2 additions and 13 deletions
|
|
@ -183,19 +183,8 @@ public static class EconomyCommand
|
|||
}
|
||||
var staged = catalogPath + ".economy-" + Guid.NewGuid().ToString("N");
|
||||
File.Copy(trial, staged);
|
||||
try
|
||||
{
|
||||
if (Fingerprint(catalogPath) != fingerprint)
|
||||
{
|
||||
output.WriteLine("The batches are refused: Aetheria.cc changed before the checked copy could replace it.");
|
||||
return 1;
|
||||
}
|
||||
File.Replace(staged, catalogPath, null);
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (File.Exists(staged)) File.Delete(staged);
|
||||
}
|
||||
try { File.Replace(staged, catalogPath, null); }
|
||||
finally { if (File.Exists(staged)) File.Delete(staged); }
|
||||
output.WriteLine($"\nWrote {written} records to Aetheria.cc");
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue