Skip to content

Commit

Permalink
Merge pull request #1 from garyb/windows-paths
Browse files Browse the repository at this point in the history
Escape windows paths when generating code for worker
  • Loading branch information
natefaubion authored Aug 6, 2021
2 parents d8eb29e + ddb7a24 commit 5ab5295
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Node/WorkerBees.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ exports.spawnImpl = function(left, right, worker, options, cb) {
var thread;
try {
thread = new workerThreads.Worker(
'require("' + res.filePath + '").' + res.export + '.spawn()',
'require("' + res.filePath.replace(/\\/g, "\\\\") + '").' + res.export + '.spawn()',
{
eval: true,
workerData: options.workerData
Expand Down

0 comments on commit 5ab5295

Please sign in to comment.