Skip to content

Windows fixes#34

Open
CyBot wants to merge 4 commits into
mjwwit:masterfrom
iurio-com:windows-fixes
Open

Windows fixes#34
CyBot wants to merge 4 commits into
mjwwit:masterfrom
iurio-com:windows-fixes

Conversation

@CyBot
Copy link
Copy Markdown

@CyBot CyBot commented May 15, 2026

Fix path and URL issues when running on windows

Copy link
Copy Markdown
Owner

@mjwwit mjwwit left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! Code looks good overall, with some final touches we can get this merged pretty quickly I think.

Comment thread lib/XMLHttpRequest.js
Comment on lines +935 to +936
+ " fs.writeFileSync(" + JSON.stringify(contentFile) + ", 'NODE-XMLHTTPREQUEST-ERROR-REDIRECT: Too many redirects', 'utf8');"
+ " fs.unlinkSync(" + JSON.stringify(syncFile) + ");"
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Better to put these into consts instead of calling stringify every time.


// Async
var url = "file://" + __dirname + "/testdata.txt";
var p = (__dirname + "/testdata.txt").replaceAll(path.sep, path.posix.sep);
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

I don't think replaceAll is available on Node.js 13 (the minimum supported Node.js version for this project). MDN states it's available from Node.js 15 onwards. Is there a simple alternative?

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.

2 participants