mirror of
https://github.com/LHY0125/PathEditor.git
synced 2026-06-29 01:45:54 +08:00
fix: backup_registry 调用加 await,避免与 save 竞态导致备份到新值
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -260,7 +260,7 @@ export const useAppStore = create<AppState>((set, get) => ({
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 备份当前注册表(保存前备份旧值,失败仅警告不中断)
|
// 备份当前注册表(保存前备份旧值,失败仅警告不中断)
|
||||||
invoke('backup_registry', { customDir: null })
|
await invoke('backup_registry', { customDir: null })
|
||||||
.catch(() => set({ statusMessage: i18n.t('status.warning_backup') }));
|
.catch(() => set({ statusMessage: i18n.t('status.warning_backup') }));
|
||||||
|
|
||||||
const [sysResult, userResult] = await Promise.allSettled([
|
const [sysResult, userResult] = await Promise.allSettled([
|
||||||
|
|||||||
Reference in New Issue
Block a user