upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/tools/rpf9dump/Program.cs
diff options
context:
space:
mode:
Diffstat (limited to 'tools/rpf9dump/Program.cs')
-rw-r--r--tools/rpf9dump/Program.cs4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/rpf9dump/Program.cs b/tools/rpf9dump/Program.cs
index ba67d4d5e..aba410a73 100644
--- a/tools/rpf9dump/Program.cs
+++ b/tools/rpf9dump/Program.cs
@@ -144,12 +144,14 @@ else if (mode is "models" or "textures")
144 { 144 {
145 byte[] header; using (var f = File.OpenRead(src)) { header = new byte[64]; f.ReadExactly(header); } 145 byte[] header; using (var f = File.OpenRead(src)) { header = new byte[64]; f.ReadExactly(header); }
146 var cached = RecoveryIndexCache.Load(mode, src, length, header); 146 var cached = RecoveryIndexCache.Load(mode, src, length, header);
147 // A partial index (rpf9-explorer stopped or still indexing) would export only part of the archive: scan again.
148 if (cached != null && !ScanCounts.IsFullScan(cached)) { Console.WriteLine($" cached {mode} index is not marked as a full scan ({cached.Entries.Count:N0} entries), rescanning"); cached = null; }
147 candidates = ScanCounts.Candidates(cached?.Coverage); 149 candidates = ScanCounts.Candidates(cached?.Coverage);
148 if (cached == null) 150 if (cached == null)
149 { 151 {
150 var cands = Scan(src, 0, null); 152 var cands = Scan(src, 0, null);
151 list = Recover(src, length, cands); 153 list = Recover(src, length, cands);
152 RecoveryIndexCache.Save(mode, src, list, ScanCounts.Coverage(cands.Count, list.Select(e => e.Offset).Distinct().Count())); 154 RecoveryIndexCache.Save(mode, src, list, ScanCounts.Coverage(cands.Count, list.Select(e => e.Offset).Distinct().Count()), complete: true);
153 candidates = cands.Count; 155 candidates = cands.Count;
154 } 156 }
155 else 157 else