From 446516e0b65b407d67c96b0f2c0f67635f3ffcd0 Mon Sep 17 00:00:00 2001 From: wss-git Date: Wed, 29 Sep 2021 16:54:00 +0800 Subject: [PATCH] fix: nas cp [id].js file --- src/lib/nas/request.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/nas/request.js b/src/lib/nas/request.js index 4fc83b5bc..f2de76aaa 100644 --- a/src/lib/nas/request.js +++ b/src/lib/nas/request.js @@ -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'; @@ -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) {