Skip to content

Commit 7673e0f

Browse files
committed
fix: reset backup status before update source check
1. Added pre-hook to reset ABStatus before update source check 2. Specifically sets status to AllCheckUpdate, NotBackup, NoABError 3. Fixes issue where failed backup state would incorrectly persist during subsequent update checks 4. Ensures clean state for new update operations fix: 在更新源检查前重置备份状态 1. 添加前置钩子在更新源检查前重置 ABStatus 2. 明确将状态设置为 AllCheckUpdate, NotBackup, NoABError 3. 修复了备份失败状态会在后续更新检查中错误保留的问题 4. 确保新更新操作处于干净状态 pms: Bug-323831
1 parent 3bd5f3f commit 7673e0f

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/lastore-daemon/manager_update.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,11 @@ func (m *Manager) updateSource(sender dbus.Sender) (*Job, error) {
123123
handleUpdateSourceFailed(j)
124124
}
125125
job.setPreHooks(map[string]func() error{
126+
string(system.RunningStatus): func() error {
127+
// 检查更新需要重置备份状态,主要是处理备份失败后再检查更新,会直接显示失败的场景
128+
m.statusManager.SetABStatus(system.AllCheckUpdate, system.NotBackup, system.NoABError)
129+
return nil
130+
},
126131
string(system.SucceedStatus): func() error {
127132
m.refreshUpdateInfos(true)
128133
m.PropsMu.Lock()

0 commit comments

Comments
 (0)