Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
112 changes: 112 additions & 0 deletions patches/@php-wasm+node+0.6.16.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
diff --git a/node_modules/@php-wasm/node/index.cjs b/node_modules/@php-wasm/node/index.cjs
index 1be4252..7f01cfd 100644
--- a/node_modules/@php-wasm/node/index.cjs
+++ b/node_modules/@php-wasm/node/index.cjs
@@ -6650,6 +6650,11 @@ function init(RuntimeName, PHPLoader) {
doStat: function(func, path, buf) {
try {
var stat = func(path);
+ if (NODEFS.isWindows) {
+ // Node.js on Windows never represents permission bit 'x', so
+ // propagate read bits to execute bits.
+ stat.mode = stat.mode | (stat.mode & 292) >> 2;
+ }
} catch (e) {
if (e && e.node && PATH.normalize(path) !== PATH.normalize(FS.getPath(e.node))) {
return -54;
@@ -14280,6 +14285,11 @@ function init2(RuntimeName, PHPLoader) {
doStat: function(func, path, buf) {
try {
var stat = func(path);
+ if (NODEFS.isWindows) {
+ // Node.js on Windows never represents permission bit 'x', so
+ // propagate read bits to execute bits.
+ stat.mode = stat.mode | (stat.mode & 292) >> 2;
+ }
} catch (e) {
if (e && e.node && PATH.normalize(path) !== PATH.normalize(FS.getPath(e.node))) {
return -54;
@@ -21910,6 +21920,11 @@ function init3(RuntimeName, PHPLoader) {
doStat: function(func, path, buf) {
try {
var stat = func(path);
+ if (NODEFS.isWindows) {
+ // Node.js on Windows never represents permission bit 'x', so
+ // propagate read bits to execute bits.
+ stat.mode = stat.mode | (stat.mode & 292) >> 2;
+ }
} catch (e) {
if (e && e.node && PATH.normalize(path) !== PATH.normalize(FS.getPath(e.node))) {
return -54;
@@ -29535,6 +29550,11 @@ function init4(RuntimeName, PHPLoader) {
doStat: function(func, path, buf) {
try {
var stat = func(path);
+ if (NODEFS.isWindows) {
+ // Node.js on Windows never represents permission bit 'x', so
+ // propagate read bits to execute bits.
+ stat.mode = stat.mode | (stat.mode & 292) >> 2;
+ }
} catch (e) {
if (e && e.node && PATH.normalize(path) !== PATH.normalize(FS.getPath(e.node))) {
return -54;
Comment on lines +41 to +52

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This corresponds to PHP version 8.0, the one that is used by default in the Studio app.

@@ -37133,6 +37153,11 @@ function init5(RuntimeName, PHPLoader) {
doStat: function(func, path, buf) {
try {
var stat = func(path);
+ if (NODEFS.isWindows) {
+ // Node.js on Windows never represents permission bit 'x', so
+ // propagate read bits to execute bits.
+ stat.mode = stat.mode | (stat.mode & 292) >> 2;
+ }
} catch (e) {
if (e && e.node && PATH.normalize(path) !== PATH.normalize(FS.getPath(e.node))) {
return -54;
@@ -44716,6 +44741,11 @@ function init6(RuntimeName, PHPLoader) {
doStat: function(func, path, buf) {
try {
var stat = func(path);
+ if (NODEFS.isWindows) {
+ // Node.js on Windows never represents permission bit 'x', so
+ // propagate read bits to execute bits.
+ stat.mode = stat.mode | (stat.mode & 292) >> 2;
+ }
} catch (e) {
if (e && e.node && PATH.normalize(path) !== PATH.normalize(FS.getPath(e.node))) {
return -54;
@@ -52294,6 +52324,11 @@ function init7(RuntimeName, PHPLoader) {
doStat: function(func, path, buf) {
try {
var stat = func(path);
+ if (NODEFS.isWindows) {
+ // Node.js on Windows never represents permission bit 'x', so
+ // propagate read bits to execute bits.
+ stat.mode = stat.mode | (stat.mode & 292) >> 2;
+ }
} catch (e) {
if (e && e.node && PATH.normalize(path) !== PATH.normalize(FS.getPath(e.node))) {
return -54;
@@ -59740,6 +59775,11 @@ function init8(RuntimeName, PHPLoader) {
doStat: function(func, path, buf) {
try {
var stat = func(path);
+ if (NODEFS.isWindows) {
+ // Node.js on Windows never represents permission bit 'x', so
+ // propagate read bits to execute bits.
+ stat.mode = stat.mode | (stat.mode & 292) >> 2;
+ }
} catch (e) {
if (e && e.node && PATH.normalize(path) !== PATH.normalize(FS.getPath(e.node))) {
return -54;
@@ -67171,6 +67211,11 @@ function init9(RuntimeName, PHPLoader) {
doStat: function(func, path, buf) {
try {
var stat = func(path);
+ if (NODEFS.isWindows) {
+ // Node.js on Windows never represents permission bit 'x', so
+ // propagate read bits to execute bits.
+ stat.mode = stat.mode | (stat.mode & 292) >> 2;
+ }
} catch (e) {
if (e && e.node && PATH.normalize(path) !== PATH.normalize(FS.getPath(e.node))) {
return -54;