Skip to content

Commit

Permalink
Merge pull request #842 from Styxxy/bugfixes/834-report-justfilename
Browse files Browse the repository at this point in the history
Fixes #834 : error reportfile without directory specified
  • Loading branch information
JoeRobich committed Oct 19, 2020
2 parents 03a8fc0 + cf12e1f commit ea58947
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ReportWriter.cs
Expand Up @@ -15,7 +15,7 @@ public static void Write(string reportPath, IEnumerable<FormattedFile> formatted
var reportFilePath = GetReportFilePath(reportPath);
var reportFolderPath = Path.GetDirectoryName(reportFilePath);

if (reportFolderPath != null && !Directory.Exists(reportFolderPath))
if (!string.IsNullOrEmpty(reportFolderPath) && !Directory.Exists(reportFolderPath))
{
Directory.CreateDirectory(reportFolderPath);
}
Expand Down

0 comments on commit ea58947

Please sign in to comment.