diff --git a/DotNetAstGen/Program.cs b/DotNetAstGen/Program.cs index 41d1de7..663ded8 100644 --- a/DotNetAstGen/Program.cs +++ b/DotNetAstGen/Program.cs @@ -202,13 +202,13 @@ private static void _ParseByteCode(string inputPath, DirectoryInfo rootOutputPat .AsParallel() .ForAll(inputFile => _SummaryForDLLFile(inputFile, exclusionRegex)); } - else if (File.Exists(inputPath)) + else if (File.Exists(inputPath) && Path.GetExtension(inputPath).ToLower() == ".dll") { var file = new FileInfo(inputPath); Debug.Assert(file.Directory != null, "Given file has a null parent directory!"); _SummaryForDLLFile(file, exclusionRegex); } - else + else if (!File.Exists(inputPath)) { _logger?.LogError("The path {inputPath} does not exist!", inputPath); Environment.Exit(1);