From 4988586397df5acc0638eafb0fe3d0ff50593a0b Mon Sep 17 00:00:00 2001 From: aixianling Date: Wed, 28 Dec 2022 16:20:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=B8=8B=E8=BD=BD=E6=89=93?= =?UTF-8?q?=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/rest/custom/download.js | 2 +- src/rest/custom/getZip.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rest/custom/download.js b/src/rest/custom/download.js index 2802bc3..da94e44 100644 --- a/src/rest/custom/download.js +++ b/src/rest/custom/download.js @@ -8,7 +8,7 @@ module.exports = { let id = request.query?.id dbUtils.detail({table: 'node_custom_config', id}).then(info => { if (info?.id) { - let path = `${info.dist || `../zips/${id}`}`, zipPath = `../zips/${info.id}.zip` + let path = `${info.dist || `../zips/${info.name}v${info.version}`}`, zipPath = `../zips/${info.id}.zip` fse.removeSync(zipPath) fse.pathExists(path, (err, exists) => { console.log(`${path}=========>${exists}`) diff --git a/src/rest/custom/getZip.js b/src/rest/custom/getZip.js index 073f308..0211dcb 100644 --- a/src/rest/custom/getZip.js +++ b/src/rest/custom/getZip.js @@ -17,7 +17,7 @@ module.exports = { mp: 'dvcp_v2_wxmp' }[info.type] || {} const path = `../${buildPath}`, - {dist = `../zips/${id}`} = info + {dist = `../zips/${info.name}v${info.version}`} = info Promise.all([ execute(`./shell/update.sh ${info.name} ${path}`), db.query(sql)