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

fix newdir

This commit is contained in:
源文雨
2022-07-25 13:21:28 +08:00
parent 706c7ece35
commit 3cab3e11e9

View File

@@ -9,6 +9,7 @@ import (
"strconv"
"strings"
"sync"
"time"
_ "image/gif"
_ "image/jpeg"
@@ -157,6 +158,11 @@ func main() {
fmt.Println("ERROR:", err)
continue
}
_, err = os.Stat(newdir)
for err != nil {
time.Sleep(time.Millisecond * 100)
_, err = os.Stat(newdir)
}
for _, i := range lst {
err = os.Rename(i.name, newdir+"/"+i.name)
if err != nil {