PUGE преди 5 месеца
родител
ревизия
1b72665d81
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      main.js

+ 1 - 1
main.js

@@ -453,7 +453,7 @@ ipcMain.on("readConfig", (event, message) => {
 ipcMain.handle("saveFile", async (event, message) => {
   try {
     // 确保download目录存在
-    const downloadDir = path.join(__dirname, 'download');
+    const downloadDir = path.join(__dirname.replaceAll('\\', '/').replace('/resources/app.asar', ''), 'download');
     if (!fs.existsSync(downloadDir)) {
       fs.mkdirSync(downloadDir, { recursive: true });
       console.log('创建download目录:', downloadDir);