X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=src%2Fcmd%2Fnncp-rm%2Fmain.go;h=67f66574f1a9c5d48ced22f41c7a263c1861e306;hb=0367cce2741e1ce6a89a49fd5c4e9df6005c9744;hp=b9ca28977c7380834393c7709cc585a9e95a1238;hpb=712399b4547bd499528a20209d469b2eb1aaff28;p=nncp.git diff --git a/src/cmd/nncp-rm/main.go b/src/cmd/nncp-rm/main.go index b9ca289..67f6657 100644 --- a/src/cmd/nncp-rm/main.go +++ b/src/cmd/nncp-rm/main.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2021 Sergey Matveev +Copyright (C) 2016-2022 Sergey Matveev This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -29,7 +29,7 @@ import ( "strings" "time" - "go.cypherpunks.ru/nncp/v7" + "go.cypherpunks.ru/nncp/v8" ) func usage() { @@ -186,8 +186,11 @@ func main() { continue } remove := func(xx nncp.TRxTx) error { - return filepath.Walk( - filepath.Join(ctx.Spool, node.Id.String(), string(xx)), + p := filepath.Join(ctx.Spool, node.Id.String(), string(xx)) + if _, err := os.Stat(p); err != nil && os.IsNotExist(err) { + return nil + } + return filepath.Walk(p, func(path string, info os.FileInfo, err error) error { if err != nil { return err