Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCropp committed Sep 18, 2024
1 parent ff840dc commit 318c6c8
Showing 1 changed file with 20 additions and 6 deletions.
26 changes: 20 additions & 6 deletions src/Verify/Verifier/InnerVerifier.cs
Original file line number Diff line number Diff line change
Expand Up @@ -196,19 +196,33 @@ void InitForFileConvention(Namer namer, string typeAndMethod, string receivedPar

getFileNames = target =>
{
var suffix = target.Name is null ? "" : $"#{target.Name}";
if (target.Name is null)
{
return new(
target.Extension,
$"{pathPrefixReceived}.received.{target.Extension}",
$"{pathPrefixVerified}.verified.{target.Extension}");
}
return new(
target.Extension,
$"{pathPrefixReceived}{suffix}.received.{target.Extension}",
$"{pathPrefixVerified}{suffix}.verified.{target.Extension}");
$"{pathPrefixReceived}#{target.Name}.received.{target.Extension}",
$"{pathPrefixVerified}#{target.Name}.verified.{target.Extension}");
};
getIndexedFileNames = (target, index) =>
{
var suffix = target.Name is null ? $"#{index}" : $"#{target.Name}.{index}";
if (target.Name is null)
{
return new(
target.Extension,
$"{pathPrefixReceived}#{index}.received.{target.Extension}",
$"{pathPrefixVerified}#{index}.verified.{target.Extension}");
}
return new(
target.Extension,
$"{pathPrefixReceived}{suffix}.received.{target.Extension}",
$"{pathPrefixVerified}{suffix}.verified.{target.Extension}");
$"{pathPrefixReceived}#{target.Name}.{index}.received.{target.Extension}",
$"{pathPrefixVerified}#{target.Name}.{index}.verified.{target.Extension}");
};

MatchingFileFinder.DeleteReceived(receivedPrefix, directory);
Expand Down

0 comments on commit 318c6c8

Please sign in to comment.