Fix an error when importing the config file if no previous config exists

This commit is contained in:
2026-01-19 12:29:45 +01:00
parent 11ac159909
commit 80f03df37c

View File

@@ -90,6 +90,8 @@ ipcMain.handle('import-data', async () => {
if (canceled || !filePaths) return if (canceled || !filePaths) return
await fs.unlink(dataPath) if(await fileExists(dataPath)) {
await fs.unlink(dataPath)
}
await fs.copyFile(filePaths[0], dataPath,fs.constants.COPYFILE_EXCL) await fs.copyFile(filePaths[0], dataPath,fs.constants.COPYFILE_EXCL)
}) })