Skip to content

Commit

Permalink
Merge pull request #3542 from dotnet/rc2-askmode-BaseIntermediateOutp…
Browse files Browse the repository at this point in the history
…utPath

Ask-Mode: [release/5.0-rc2] Custom intermediate output paths shouldn't break markup compilation
  • Loading branch information
ryalanms authored Oct 6, 2020
2 parents ab840c4 + 8733ef2 commit 3d4e91c
Show file tree
Hide file tree
Showing 3 changed files with 389 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1575,19 +1575,11 @@ private string ParentFolderPrefix
{
get
{
string parentFolderPrefix = string.Empty;
if (TargetPath.StartsWith(SourceFileInfo.SourcePath, StringComparison.OrdinalIgnoreCase))
{
string relPath = TargetPath.Substring(SourceFileInfo.SourcePath.Length);
relPath += SourceFileInfo.RelativeSourceFilePath;
string[] dirs = relPath.Split(new Char[] { Path.DirectorySeparatorChar });
for (int i = 1; i < dirs.Length; i++)
{
parentFolderPrefix += PARENTFOLDER;
}
}

return parentFolderPrefix;
#if NETFX
return PathInternal.GetRelativePath(TargetPath, SourceFileInfo.SourcePath, StringComparison.OrdinalIgnoreCase);
#else
return Path.GetRelativePath(TargetPath, SourceFileInfo.SourcePath);
#endif
}
}

Expand Down
Loading

0 comments on commit 3d4e91c

Please sign in to comment.