fix: handle error on rename

This commit is contained in:
Jan Bader
2025-01-27 23:36:51 +01:00
parent faf32dd21a
commit 75c93a54f7

View File

@ -114,7 +114,10 @@ func normalize(p string, f os.FileInfo, err error) error {
if dryrun {
fmt.Printf("Would move %s to %s\n", p, newPath)
} else {
os.Rename(p, newPath)
err = os.Rename(p, newPath)
if err != nil {
return err
}
fmt.Printf("%s => %s\n", p, newPath)
}
}