Skip to content

Commit 11505d6

Browse files
committed
C#: Make the assembly cache more robust against non-existing paths.
1 parent 56a70da commit 11505d6

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/AssemblyCache.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,18 @@ public AssemblyCache(IEnumerable<string> paths, ProgressMonitor progressMonitor)
2727
if (File.Exists(path))
2828
{
2929
pendingDllsToIndex.Enqueue(path);
30+
continue;
3031
}
31-
else
32+
33+
if (Directory.Exists(path))
3234
{
3335
progressMonitor.FindingFiles(path);
3436
AddReferenceDirectory(path);
3537
}
38+
else
39+
{
40+
progressMonitor.LogInfo("AssemblyCache: Path not found: " + path);
41+
}
3642
}
3743
IndexReferences();
3844
}

0 commit comments

Comments
 (0)