diff options
Diffstat (limited to 'doIncoming.go')
| -rw-r--r-- | doIncoming.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/doIncoming.go b/doIncoming.go index 636aa14..636ff18 100644 --- a/doIncoming.go +++ b/doIncoming.go @@ -69,11 +69,14 @@ func doIncoming(pb *zoopb.Packages) (string, error) { log.Printf("different checksums: %s %s\n", path, newfilename) log.Printf("md5sum old %x vs new %x\n", md5.Sum(olddata), md5.Sum(newdata)) } + if argv.Force { + moveFileToBroken(newfilename) + // os.Rename(path, newfilename) + // log.Printf("%s moved incoming oldname %s newname: %s\n", packageName, path, newfilename) + } // return "file already exists. use --force to replace", errors.New("duplicate .deb in incoming/") me.sh.GoodExit("file already exists. TODO: fix this to use --force to replace") } - os.Rename(path, newfilename) - log.Printf("%s moved incoming oldname %s newname: %s\n", packageName, path, newfilename) incount += 1 if incount > 100 { me.sh.GoodExit("file moved") |
