Skip to content

Commit

Permalink
bugfix download winetricks
Browse files Browse the repository at this point in the history
  • Loading branch information
hitman249 committed Jun 22, 2023
1 parent 48ff76e commit 0f617e4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
18 changes: 11 additions & 7 deletions src/src/modules/kernels/wine.js
Original file line number Diff line number Diff line change
Expand Up @@ -526,15 +526,19 @@ export default class Wine extends AbstractWine {

let file = this.appFolders.getWinetricksFile();

const find = () => [ ...this.fs.fileGetContents(file).matchAll(/^w_metadata (.+?) (.+?) \\\n.*title="(.+?)" \\/gm) ]
.filter(n => !skip.includes(n[1].trim()) && !/^dxvk[0-9]{1,}/gm.test(n[1].trim()) && !/^galliumnine[0-9]{1,}/gm.test(n[1].trim()))
.map(n => ({ name: n[1].trim(), description: n[3].trim() }));
return this.update.downloadWinetricks()
.then(() => this.fs.exists(file) ? null : Promise.reject())
.then(() => {
const find = () => [ ...this.fs.fileGetContents(file).matchAll(/^w_metadata (.+?) (.+?) \\\n.*title="(.+?)" \\/gm) ]
.filter(n => !skip.includes(n[1].trim()) && !/^dxvk[0-9]{1,}/gm.test(n[1].trim()) && !/^galliumnine[0-9]{1,}/gm.test(n[1].trim()))
.map(n => ({ name: n[1].trim(), description: n[3].trim() }));

if (!this.fs.exists(file)) {
return Promise.resolve(find());
}
if (!this.fs.exists(file)) {
return Promise.resolve(find());
}

return Promise.resolve(find());
return Promise.resolve(find());
});
}

clear() {
Expand Down
2 changes: 1 addition & 1 deletion src/src/modules/update.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const fs = require('fs');

export default class Update {

version = '1.5.18';
version = '1.5.19';

/**
* @type {string}
Expand Down

0 comments on commit 0f617e4

Please sign in to comment.