diff --git a/DotNetAstGen/Program.cs b/DotNetAstGen/Program.cs index 19e1dd1..f252807 100644 --- a/DotNetAstGen/Program.cs +++ b/DotNetAstGen/Program.cs @@ -58,7 +58,7 @@ public static void Main(string[] args) // Handle .cs _ParseSourceCode( - options.InputFilePath, + new DirectoryInfo(options.InputFilePath), new DirectoryInfo(options.OutputDirectory), options.ExclusionRegex); @@ -69,13 +69,15 @@ public static void Main(string[] args) }); } - private static void _ParseSourceCode(string inputPath, DirectoryInfo rootOutputPath, string? exclusionRegex) + private static void _ParseSourceCode(DirectoryInfo inputDirPath, DirectoryInfo rootOutputPath, string? exclusionRegex) { if (!rootOutputPath.Exists) { rootOutputPath.Create(); } + var inputPath = inputDirPath.FullName; + if (Directory.Exists(inputPath)) { _logger?.LogInformation("Parsing directory {dirName}", inputPath);