server: normalize fs path

This commit is contained in:
Koushik Dutta
2024-08-13 22:45:51 -07:00
parent 2b353cf4c8
commit 8a8bee33c1
7 changed files with 19 additions and 12 deletions

View File

@@ -96,7 +96,10 @@ export class PythonRuntimeWorker extends ChildProcessWorker {
const setup = () => {
const types = require.resolve('@scrypted/types');
const PYTHONPATH = types.substring(0, types.indexOf('types') + 'types'.length);
const fsDir = path.join(options.unzippedPath, 'fs');
fs.mkdirSync(fsDir, { recursive: true });
this.worker = child_process.spawn(pythonPath, args, {
cwd: fsDir,
// stdin, stdout, stderr, peer in, peer out
stdio: ['pipe', 'pipe', 'pipe', 'pipe', 'pipe'],
env: Object.assign({