Skip to content

Commit

Permalink
Fixing copying
Browse files Browse the repository at this point in the history
  • Loading branch information
credfeto committed Jan 25, 2024
1 parent 0edd808 commit 4fabba0
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ private static IEnumerable<CopyInstruction> IncludeFilesInSource(FileContext fil
{
string sourceFolderName = Path.Combine(path1: fileContext.UpdateContext.TemplateFolder, path2: sourceFolder);

int sourceFolderNamePrefixLength = sourceFolderName.Length + 1;
int sourceFolderNamePrefixLength = TemplateFolderLength(fileContext);

if (Directory.Exists(sourceFolderName))
{
Expand All @@ -294,6 +294,11 @@ private static IEnumerable<CopyInstruction> IncludeFilesInSource(FileContext fil
return [];
}

private static int TemplateFolderLength(in FileContext fileContext)
{
return fileContext.UpdateContext.TemplateFolder.Length + 1;
}

[SuppressMessage(category: "Meziantou.Analyzer", checkId: "MA0051: Method is too long", Justification = "Debug logging")]
private async ValueTask UpdateDotNetAsync(TemplateUpdateContext updateContext,
RepoContext repoContext,
Expand Down

0 comments on commit 4fabba0

Please sign in to comment.