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 Wine plugin "Override DLL" #1152

Merged
merged 1 commit into from
Dec 24, 2019
Merged

Fix Wine plugin "Override DLL" #1152

merged 1 commit into from
Dec 24, 2019

Conversation

plata
Copy link
Collaborator

@plata plata commented Dec 23, 2019

see #1151

@plata
Copy link
Collaborator Author

plata commented Dec 23, 2019

@Zemogiter please try.

@plata plata requested a review from madoar December 23, 2019 15:55
Copy link
Collaborator

@madoar madoar left a comment

Choose a reason for hiding this comment

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

@plata can you please add a reference to the issue/comment this PR fixes?

@@ -3,23 +3,21 @@ const Regedit = include("engines.wine.plugins.regedit");
module.default = class OverrideDLL {
constructor(wine) {
this.wine = wine;
this.modes = {};
this.modes = new Map();
Copy link
Collaborator

Choose a reason for hiding this comment

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

Indeed a Map is a better choice here.


return this;
}

go() {
let regeditFileContent = `REGEDIT4\n\n[HKEY_CURRENT_USER\\Software\\Wine\\DllOverrides]\n`;

Object.entries(this.modes)
.map(([mode, libraries]) => libraries.map(library => [library, mode]))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just as a sidenot, I think the following change would be enough to fix the issue but I agree that your code is more readable:

.flatMap(([mode, libraries]) => libraries.map(library => [library, mode]))

@Zemogiter
Copy link
Contributor

@plata thanks now it works

@plata plata merged commit fa0eacc into master Dec 24, 2019
@plata plata deleted the fix-override-dll branch December 24, 2019 16:08
This was referenced Dec 24, 2019
petermetz pushed a commit to petermetz/scripts that referenced this pull request Jun 7, 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.

3 participants