Skip to content

Commit

Permalink
Minor slashes fix improvements for #193
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-boyarshin committed Sep 14, 2018
1 parent 4bcc6e5 commit c972c15
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Project2015To2017/Definition/Solution.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public DirectoryInfo NuGetPackagesPath
//return the explicitly set path, or if there isn't one, then assume the 'packages' folder is in the solution folder
var path = repositoryPathSetting ?? Path.GetFullPath(Path.Combine(solutionFolder, "packages"));

return new DirectoryInfo(Extensions.MaybeAdjustFilePath(path));
return new DirectoryInfo(Extensions.MaybeAdjustFilePath(path, solutionFolder));
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion Project2015To2017/Reading/AssemblyInfoReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public AssemblyAttributes Read(Project project)
.Select(x =>
{
var filePath = Path.IsPathRooted(x) ? x : Path.GetFullPath(Path.Combine(projectPath, x));
return new FileInfo(Extensions.MaybeAdjustFilePath(filePath));
return new FileInfo(Extensions.MaybeAdjustFilePath(filePath, projectPath));
}
)
.Where(IsAssemblyInfoFile)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,11 @@ bool AssemblyMatchesPackage(AssemblyReference assembly, string packagePath)
return false;
}

hintPath = Extensions.MaybeAdjustFilePath(hintPath, projectPath);

var fullHintPath = Path.IsPathRooted(hintPath) ? hintPath : Path.GetFullPath(Path.Combine(projectPath, hintPath));

return Extensions.MaybeAdjustFilePath(fullHintPath).ToLower().StartsWith(Extensions.MaybeAdjustFilePath(packagePath));
return fullHintPath.ToLowerInvariant().StartsWith(Extensions.MaybeAdjustFilePath(packagePath, projectPath));
}
}
}
Expand Down

0 comments on commit c972c15

Please sign in to comment.