镜像自地址
https://github.com/tuna/tunasync.git
已同步 2025-12-05 22:16:47 +00:00
@@ -53,6 +53,7 @@ func diffMirrorConfig(oldList, newList []mirrorConfig) []mirrorCfgTrans {
|
||||
sort.Sort(sortableMirrorList(oList))
|
||||
sort.Sort(sortableMirrorList(nList))
|
||||
|
||||
if len(oList) != 0 && len(nList) != 0 {
|
||||
// insert a tail node to both lists
|
||||
// as the maximum node
|
||||
lastOld, lastNew := oList[len(oList)-1], nList[len(nList)-1]
|
||||
@@ -83,6 +84,14 @@ func diffMirrorConfig(oldList, newList []mirrorConfig) []mirrorCfgTrans {
|
||||
j++
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for i := 0; i < len(oList); i++ {
|
||||
operations = append(operations, mirrorCfgTrans{diffDelete, oList[i]})
|
||||
}
|
||||
for i := 0; i < len(nList); i++ {
|
||||
operations = append(operations, mirrorCfgTrans{diffAdd, nList[i]})
|
||||
}
|
||||
}
|
||||
|
||||
return operations
|
||||
}
|
||||
|
||||
在新工单中引用
屏蔽一个用户