mirror of
https://github.com/Gabi-Zar/Silk-Fly-Launcher.git
synced 2026-04-17 05:26:04 +02:00
Fix an error when importing the config file if no previous config exists
This commit is contained in:
4
main.js
4
main.js
@@ -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)
|
||||||
})
|
})
|
||||||
Reference in New Issue
Block a user