1
0
mirror of https://github.com/fumiama/dupimage.git synced 2026-06-19 10:10:23 +08:00

fix: delete self

This commit is contained in:
源文雨
2022-07-30 11:58:31 +08:00
parent 030d9251bc
commit d9db053fc8

View File

@@ -121,7 +121,7 @@ func main() {
for i := 0; i < len(chklst); i++ { for i := 0; i < len(chklst); i++ {
fmt.Print("compare: ", i, " / ", len(chklst), "\r") fmt.Print("compare: ", i, " / ", len(chklst), "\r")
if isdebu { if isdebu {
fmt.Print('\n') fmt.Print("\n")
} }
x, ok := duplis[uint(i)] x, ok := duplis[uint(i)]
if ok { if ok {
@@ -157,13 +157,13 @@ func main() {
isfirst = false isfirst = false
hasfound = true hasfound = true
if isdebu { if isdebu {
fmt.Println("is first, add directly") fmt.Println("first time appears, add directly:", sameset[k])
} }
} else { } else {
INNERLOP: INNERLOP:
for l, set := range sameset { for l, set := range sameset {
for _, item := range set { for _, item := range set {
if item == uint(i) { // 找到旧组 if item == uint(i) && l != k { // 找到旧组
if isdebu { if isdebu {
fmt.Println("merge old set", set, "into", sameset[k]) fmt.Println("merge old set", set, "into", sameset[k])
} }
@@ -193,7 +193,7 @@ func main() {
} }
duplis[uint(j)] = uint(i) duplis[uint(j)] = uint(i)
if isdebu { if isdebu {
fmt.Print('\n') fmt.Print("\n")
} }
} }
} }