diff --git a/src/NexusMods.DataModel/ArchiveAnalyzer.cs b/src/NexusMods.DataModel/ArchiveAnalyzer.cs index 0941530d38..e759787992 100644 --- a/src/NexusMods.DataModel/ArchiveAnalyzer.cs +++ b/src/NexusMods.DataModel/ArchiveAnalyzer.cs @@ -93,11 +93,14 @@ public async Task AnalyzeFileAsync(AbsolutePath path, Cancellation // Analyze the archive and cache the info var result = await AnalyzeFileInnerAsync(new NativeFileStreamFactory(path), path.FileName, token); - result.EnsurePersisted(_store); - // Save the source of this archive so we can use it later + if (result is AnalyzedArchive archive) - { + { + // Only persist AnalyzedData if it's an archive + result.EnsurePersisted(_store); + + // Save the source of this archive so we can use it later var metaData = FileArchiveMetaData.Create(path, archive); metaData.EnsurePersisted(_store); }