Skip to content

Commit

Permalink
Fix UnauthorizedAccessException on Directory.CreateDirectory (#467)
Browse files Browse the repository at this point in the history
  • Loading branch information
erwan-joly authored Jan 30, 2022
1 parent 994fe4b commit 14adffb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Verify/Verifier/InnerVerifier.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ public InnerVerifier(string sourceFile, VerifySettings settings, GetFileConventi
else
{
directory = Path.Combine(sourceFileDirectory, directory);
Directory.CreateDirectory(directory);
if (!Directory.Exists(directory))
{
Directory.CreateDirectory(directory);
}
}

this.directory = directory;
Expand Down

0 comments on commit 14adffb

Please sign in to comment.