]> Cypherpunks.ru repositories - nncp.git/blobdiff - src/cmd/nncp-rm/main.go
Streamed NNCPE format
[nncp.git] / src / cmd / nncp-rm / main.go
index b9ca28977c7380834393c7709cc585a9e95a1238..501f5fcd2c606ea3814978fc57300cc320fddd89 100644 (file)
@@ -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