From 658a7031b6416b8a6795c0ccfedfb11ce0fd45c3 Mon Sep 17 00:00:00 2001 From: Cheney Date: Thu, 13 Mar 2025 15:48:22 +0800 Subject: [PATCH] =?UTF-8?q?remote=20=E5=91=BD=E4=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kit/src/config/SystemConfig.js | 2 +- kit/src/remote/index.js | 1 + kit/src/remote/publish.js | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/kit/src/config/SystemConfig.js b/kit/src/config/SystemConfig.js index 97e8364..e0ac131 100644 --- a/kit/src/config/SystemConfig.js +++ b/kit/src/config/SystemConfig.js @@ -32,7 +32,7 @@ module.exports = class SystemConfig { if ( this.isWindows() ) { path = require('path').dirname(require.main.filename) } else { - path = process.execPath; + path = require('path').dirname(process.execPath); } this.affirmDir(path) $logger.debug(`LocalKitPath=${path}`) diff --git a/kit/src/remote/index.js b/kit/src/remote/index.js index 4a36c63..779d9a6 100644 --- a/kit/src/remote/index.js +++ b/kit/src/remote/index.js @@ -172,6 +172,7 @@ module.exports = class Remote { } async wUpload(from, to, debug){ + $logger.info(`from=${from} to=${to}`) const totalSize = fs.statSync(from).size; debug ? console.log("totalSize", totalSize) : null const rs = fs.createReadStream( from ); diff --git a/kit/src/remote/publish.js b/kit/src/remote/publish.js index 5d1ba0a..35f3d22 100644 --- a/kit/src/remote/publish.js +++ b/kit/src/remote/publish.js @@ -27,7 +27,7 @@ module.exports = async function publish(remote, localFile, remotePath) { let filename = path.basename(localFile); // 上传文件 - await remote.wUpload( localFile , path.posix.resolve(folder , filename ), true); + await remote.wUpload( localFile , path.posix.resolve(folder , filename )); } else {