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:
soul 2026-10-23 06:09:35 +02:00
commit 7c9a970c81

View file

@ -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;
}