diff --git a/nodeService.js b/nodeService.js index 1971414..462c07a 100644 --- a/nodeService.js +++ b/nodeService.js @@ -47,7 +47,7 @@ app.post('/createShortcut', (req, res) => { Exec=/usr/bin/chromium-browser ${shortcutURL} Icon=/usr/share/icons/hicolor/48x48/apps/chromium-browser.png`; - fs.writeFile(shortcutFolderPath, shortcutFileContent, (err) => { + fs.writeFileSync(shortcutFolderPath, shortcutFileContent, (err) => { if (err) { console.error(err); res.status(500).send('安装失败!');