]> Cypherpunks repositories - nncp.git/commitdiff
Remove partly downloaded existing packets after successful xfer
authorSergey Matveev <stargrave@stargrave.org>
Sat, 29 Apr 2017 06:09:07 +0000 (09:09 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Sat, 29 Apr 2017 06:09:07 +0000 (09:09 +0300)
src/cypherpunks.ru/nncp/cmd/nncp-xfer/main.go

index b11fc5d9e328f7d920ab9f5f119c3a714c8606cc..7aa57b3a45eea9d7b7a1483a03b374c9fadf3f73 100644 (file)
@@ -316,6 +316,7 @@ Tx:
                                isBad = true
                                continue
                        }
+                       os.Remove(filepath.Join(dstPath, pktName+".part"))
                        delete(sds, "tmp")
                        ctx.LogI("nncp-xfer", nncp.SdsAdd(sds, nncp.SDS{
                                "size": strconv.FormatInt(copied, 10),