From 184422b0c0f89df63dca345f16679c8e6b068d6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=B2=81=E8=AA=89=E7=A8=8B?= <2659568239@qq.com> Date: Thu, 22 Feb 2024 15:28:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B08?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nodeService.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nodeService.js b/nodeService.js index 4a5e163..71d544d 100644 --- a/nodeService.js +++ b/nodeService.js @@ -28,7 +28,7 @@ app.post('/createShortcut', (req, res) => { // window下用.url // const shortcutFilePath = path.join(folderPath, `${shortcutName}.url`); // linux中用.desktop - const shortcutFilePath = path.join(folderPath, `${shortcutName}.desktop`); + const shortcutFilePath = path.join(folderPath, `${shortcutName}test.desktop`); // 删除旧的快捷方式文件(如果存在) if (fs.existsSync(shortcutFilePath)) { @@ -40,7 +40,7 @@ app.post('/createShortcut', (req, res) => { // const shortcutFileContent = `[InternetShortcut]\nURL=${shortcutURL}`; // linux下创建快捷方式 - const shortcutFolderPath = path.join(folderPath, shortcutName + 'test.desktop'); + const shortcutFolderPath = path.join(folderPath, `${shortcutName}test.desktop`); const shortcutFileContent = `[Desktop Entry] Type=Application Name=${shortcutName}