From 86695e7842b3a76742b7a78783f79a5681b393fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20Neum=C3=BCller?= Date: Thu, 9 Mar 2017 00:21:59 +0100 Subject: [PATCH] due to a glitch with re-running analysis, file-entries might be added multiple times. shouldn't happen too often, so made the easy fix to just accept that (and take the first file) --- src/SuperDumpService/Services/DumpStorageFilebased.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SuperDumpService/Services/DumpStorageFilebased.cs b/src/SuperDumpService/Services/DumpStorageFilebased.cs index 32f3317..48a08e4 100644 --- a/src/SuperDumpService/Services/DumpStorageFilebased.cs +++ b/src/SuperDumpService/Services/DumpStorageFilebased.cs @@ -126,7 +126,7 @@ internal IEnumerable GetSDFileInfos(string bundleId, string dumpId) private SDFileEntry GetSDFileEntry(DumpMetainfo dumpInfo, FileInfo fileInfo) { // the file should be registered in dumpInfo - SDFileEntry fileEntry = dumpInfo.Files.Where(x => x.FileName == fileInfo.Name).SingleOrDefault(); + SDFileEntry fileEntry = dumpInfo.Files.Where(x => x.FileName == fileInfo.Name).FirstOrDefault(); // due to a bug, multiple entries for the same file could exist if (fileEntry != null) return fileEntry; // but if it's not registered, do some heuristic to figure out which type of file it is.