From a5d6fb09bb1112c43dc87a9a59a6aa6104746fcf Mon Sep 17 00:00:00 2001 From: Subhamoy Biswas Date: Mon, 2 Mar 2026 09:49:47 +0530 Subject: [PATCH] refactor: don't auto create download/temp dirs --- src/App.tsx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 77c91c4..edebfba 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -193,21 +193,18 @@ export default function App({ children }: { children: React.ReactNode }) { const tempDownloadDirPath = isFlatpak ? await join(downloadDirPath, config.appName, '.tempdownloads') : await join(tempDirPath, config.appPkgName, 'downloads'); const appDownloadDirPath = await join(downloadDirPath, config.appName); - LOG.info('NEODLP', `Resolved paths: isFlatpak: ${isFlatpak}, downloadDir: ${downloadDirPath}, tempDir: ${tempDirPath}, tempDownloadDir: ${tempDownloadDirPath}, appDownloadDir: ${appDownloadDirPath}`); - - if (!await fs.exists(tempDownloadDirPath)) fs.mkdir(tempDownloadDirPath, { recursive: true }).then(() => { console.log(`Created DIR: ${tempDownloadDirPath}`) }); + // if (!await fs.exists(tempDownloadDirPath)) fs.mkdir(tempDownloadDirPath, { recursive: true }).then(() => { console.log(`Created DIR: ${tempDownloadDirPath}`) }); setPath('ffmpegPath', ffmpegPath); setPath('tempDownloadDirPath', tempDownloadDirPath); if (DOWNLOAD_DIR) { setPath('downloadDirPath', DOWNLOAD_DIR); } else { - if(!await fs.exists(appDownloadDirPath)) fs.mkdir(appDownloadDirPath, { recursive: true }).then(() => { console.log(`Created DIR: ${appDownloadDirPath}`) }); + // if(!await fs.exists(appDownloadDirPath)) fs.mkdir(appDownloadDirPath, { recursive: true }).then(() => { console.log(`Created DIR: ${appDownloadDirPath}`) }); setPath('downloadDirPath', appDownloadDirPath); } console.log('Paths initialized:', { ffmpegPath, tempDownloadDirPath, downloadDirPath: DOWNLOAD_DIR || appDownloadDirPath }); } catch (e) { - LOG.error('NEODLP', `Failed to fetch paths: ${e}`); console.error('Failed to fetch paths:', e); } };