Skip to content

Commit

Permalink
Merge pull request #1138 from alibaba/fix/nas-sync
Browse files Browse the repository at this point in the history
fix: nas cp [id].js file
  • Loading branch information
rsonghuster authored Sep 29, 2021
2 parents 4b398be + 446516e commit bb48014
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 bb48014

Please sign in to comment.