mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-07-05 21:50:46 +08:00
fix(BackupManager): update data destination path to use userDataPath for backup restoration
This commit is contained in:
@@ -600,7 +600,7 @@ class BackupManager {
|
||||
|
||||
// Restore Data directory
|
||||
const dataSource = path.join(this.tempDir, 'Data')
|
||||
const dataDest = path.join(getDataPath(), restoreSuffix)
|
||||
const dataDest = path.join(userDataPath, 'Data' + restoreSuffix)
|
||||
const dataExists = await fs.pathExists(dataSource)
|
||||
const dataFiles = dataExists ? await fs.readdir(dataSource) : []
|
||||
|
||||
@@ -658,8 +658,9 @@ class BackupManager {
|
||||
|
||||
// Restore Data directory
|
||||
const restoreSuffix = isWin ? '.restore' : ''
|
||||
const userDataPath = app.getPath('userData')
|
||||
const dataSourcePath = path.join(this.tempDir, 'Data')
|
||||
const dataDestPath = path.join(getDataPath(), restoreSuffix)
|
||||
const dataDestPath = path.join(userDataPath, 'Data' + restoreSuffix)
|
||||
|
||||
const dataExists = await fs.pathExists(dataSourcePath)
|
||||
const dataFiles = dataExists ? await fs.readdir(dataSourcePath) : []
|
||||
|
||||
Reference in New Issue
Block a user