Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #971 Shared Projects incorrecly included. #972

Merged
merged 1 commit into from
Jul 5, 2020

Conversation

thorgeirk11
Copy link
Contributor

@thorgeirk11 thorgeirk11 commented Jul 5, 2020

Fix for #971

The issue was that shared projected are referenced with a ..\
E.g.

  <Import Project="..\SharedProject.projitems" Label="Shared" />

CollectDocument incorrectly parsed that as navigation up by one folder instead of the SharedProject folder.

mpc -i C:\source\AllMyProjects\MsgPackProject.csproj would call the IterateCsFileWithoutBinObj() method with the path
C:\source\AllMyProjects\..\SharedProject.projitems instead of C:\source\AllMyProjects\SharedProject.projitems

This change calls Path.GetFullPath that resolves '..' to the actual path.

A '..\' results in an incorrect root folder.
Allowing files outside the shared project to be included.
Copy link
Collaborator

@AArnott AArnott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

@AArnott AArnott merged commit 73b1d03 into MessagePack-CSharp:master Jul 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants