File Electron-17-globalpaths-workaround.patch of Package discord-wbundled-electron

In Electron 17, require('module').globalPaths is no longer supported and a no-op.
See https://github.com/electron/electron/issues/33504

--- a/resources/app/app_bootstrap/requireNative.js	2022-03-10 18:27:03.000000000 +0100
+++ b/resources/app/app_bootstrap/requireNative.js	2022-03-30 13:10:33.678004670 +0200
@@ -1,5 +1,8 @@
 "use strict";
 
 // require(), with paths specialized for requiring only native modules.
-module.paths = [];
-module.exports = require;
\ Brak znaku nowej linii na końcu pliku
+function require2(...ax) {
+    module.paths = require('module').globalPaths
+    return require(...ax)
+}
+module.exports = require2;
openSUSE Build Service is sponsored by