Skip to content

Commit

Permalink
fix: nas cp [id].js file
Browse files Browse the repository at this point in the history
  • Loading branch information
wss-git committed Sep 29, 2021
1 parent 4b398be commit 446516e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib/nas/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const { readFileChunk } = require('./cp/file');
const { getServiceMeta } = require('../import/service');

const path = require('path');
const _ = require('lodash');
const constants = require('./constants');
const PROXY = 'proxy';

Expand Down Expand Up @@ -99,7 +100,7 @@ async function sendUnzipRequest(nasHttpTriggerPath, dstDir, nasZipFile, unzipFil
cmd = cmd + ` '${unzipFile}'`;
}

return await sendCmdRequest(nasHttpTriggerPath, cmd);
return await sendCmdRequest(nasHttpTriggerPath, _.escapeRegExp(cmd));
}

async function sendCleanRequest(nasHttpTriggerPath, nasZipFile) {
Expand Down

0 comments on commit 446516e

Please sign in to comment.