Skip to content

Commit

Permalink
Attempt at fixing slashes
Browse files Browse the repository at this point in the history
  • Loading branch information
hvanbakel authored and andrew-boyarshin committed Sep 14, 2018
1 parent dafcc2f commit 4bcc6e5
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 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(path);
return new DirectoryInfo(Extensions.MaybeAdjustFilePath(path));
}
}
}
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(filePath);
return new FileInfo(Extensions.MaybeAdjustFilePath(filePath));
}
)
.Where(IsAssemblyInfoFile)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ bool AssemblyMatchesPackage(AssemblyReference assembly, string packagePath)

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

return fullHintPath.ToLower().StartsWith(packagePath);
return Extensions.MaybeAdjustFilePath(fullHintPath).ToLower().StartsWith(Extensions.MaybeAdjustFilePath(packagePath));
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ public void Transform(Project definition)

var packageReferenceIds = definition.PackageReferences.Select(x => x.Id).ToArray();

var packagePaths = packageReferenceIds.Select(packageId => Path.Combine(nugetRepositoryPath, packageId).ToLower())
var adjustedPath = Extensions.MaybeAdjustFilePath(nugetRepositoryPath);
var packagePaths = packageReferenceIds.Select(packageId => Path.Combine(adjustedPath, packageId).ToLower())
.ToArray();

definition.Imports = FilteredImports(definition.Imports, packagePaths, projectPath);
Expand Down

0 comments on commit 4bcc6e5

Please sign in to comment.