Skip to content

Commit

Permalink
Revert "Merge pull request #3637 from dotnet/revertPath"
Browse files Browse the repository at this point in the history
This reverts commit 85c890f, reversing
changes made to 5800b00.
  • Loading branch information
ryalanms committed Oct 14, 2020
1 parent 5766949 commit 9c723ef
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) + Path.DirectorySeparatorChar;
#else
return Path.GetRelativePath(TargetPath, SourceFileInfo.SourcePath) + Path.DirectorySeparatorChar;
#endif
}
}

Expand Down
Loading

0 comments on commit 9c723ef

Please sign in to comment.