1
0
mirror of https://github.com/fumiama/dupimage.git synced 2026-06-19 02:09:49 +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++ {
fmt.Print("compare: ", i, " / ", len(chklst), "\r")
if isdebu {
fmt.Print('\n')
fmt.Print("\n")
}
x, ok := duplis[uint(i)]
if ok {
@@ -157,13 +157,13 @@ func main() {
isfirst = false
hasfound = true
if isdebu {
fmt.Println("is first, add directly")
fmt.Println("first time appears, add directly:", sameset[k])
}
} else {
INNERLOP:
for l, set := range sameset {
for _, item := range set {
if item == uint(i) { // 找到旧组
if item == uint(i) && l != k { // 找到旧组
if isdebu {
fmt.Println("merge old set", set, "into", sameset[k])
}
@@ -193,7 +193,7 @@ func main() {
}
duplis[uint(j)] = uint(i)
if isdebu {
fmt.Print('\n')
fmt.Print("\n")
}
}
}