mirror of
https://github.com/hicccc77/WeFlow.git
synced 2026-03-25 07:16:51 +00:00
fix:自动保存bug
This commit is contained in:
@@ -444,7 +444,9 @@ function SettingsPage() {
|
|||||||
try {
|
try {
|
||||||
const result = await dialog.openFile({ title: '选择微信数据库根目录', properties: ['openDirectory'] })
|
const result = await dialog.openFile({ title: '选择微信数据库根目录', properties: ['openDirectory'] })
|
||||||
if (!result.canceled && result.filePaths.length > 0) {
|
if (!result.canceled && result.filePaths.length > 0) {
|
||||||
setDbPath(result.filePaths[0])
|
const path = result.filePaths[0]
|
||||||
|
setDbPath(path)
|
||||||
|
await configService.setDbPath(path)
|
||||||
showMessage('已选择数据库目录', true)
|
showMessage('已选择数据库目录', true)
|
||||||
}
|
}
|
||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
@@ -488,7 +490,9 @@ function SettingsPage() {
|
|||||||
try {
|
try {
|
||||||
const result = await dialog.openFile({ title: '选择缓存目录', properties: ['openDirectory'] })
|
const result = await dialog.openFile({ title: '选择缓存目录', properties: ['openDirectory'] })
|
||||||
if (!result.canceled && result.filePaths.length > 0) {
|
if (!result.canceled && result.filePaths.length > 0) {
|
||||||
setCachePath(result.filePaths[0])
|
const path = result.filePaths[0]
|
||||||
|
setCachePath(path)
|
||||||
|
await configService.setCachePath(path)
|
||||||
showMessage('已选择缓存目录', true)
|
showMessage('已选择缓存目录', true)
|
||||||
}
|
}
|
||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
|
|||||||
Reference in New Issue
Block a user