Skip to content

Conversation

@JaynieBai
Copy link
Member

Fixes #8231

Changes Made

Create resouse string and pass the log object as a parameter in the MakeHardLink function

Testing

Test locally

@JaynieBai JaynieBai changed the title Localize strings on hardlink failure on non-Windows Localize strings of link error messages on non-Windows Jan 5, 2023
Copy link
Member

@JanKrivanek JanKrivanek left a comment

Choose a reason for hiding this comment

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

Looks good. Thank you!

Copy link
Contributor

@Forgind Forgind left a comment

Choose a reason for hiding this comment

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

LGTM!

@Forgind Forgind added the merge-when-branch-open PRs that are approved, except that there is a problem that means we are not merging stuff right now. label Jan 19, 2023
Co-authored-by: Forgind <[email protected]>
@JaynieBai JaynieBai merged commit 5a635cf into main Jan 20, 2023
@JaynieBai JaynieBai deleted the jennbybai/issue8231 branch January 20, 2023 07:03
{
hardLinkCreated = link(exitingFileName, newFileName) == 0;
errorMessage = hardLinkCreated ? null : "The link() library call failed with the following error code: " + Marshal.GetLastWin32Error();
errorMessage = hardLinkCreated ? null : log.FormatResourceString("Copy.LinklibraryFailedPrefix", "link()", Marshal.GetLastWin32Error());
Copy link
Member

Choose a reason for hiding this comment

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

This resource doesn't seem to exist?

Copy link
Contributor

Choose a reason for hiding this comment

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

That's awkward. Will fix—thanks for pointing that out!

Forgind added a commit to Forgind/msbuild that referenced this pull request Mar 3, 2023
dotnet#8238 added a reference to "Copy.LinkLibraryFailedPrefix" but didn't actually add that to our .resx. This adds it.
JaynieBai pushed a commit that referenced this pull request Mar 9, 2023
Fixes https://github.com/dotnet/msbuild/pull/8238/files#r1125001007

Context
#8238 added a reference to "Copy.LinkLibraryFailedPrefix" but didn't actually add that to our .resx. This adds it.

Changes Made
Added a resource
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-when-branch-open PRs that are approved, except that there is a problem that means we are not merging stuff right now.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unlocalized strings on hardlink failure on non-Windows

7 participants