]> Cypherpunks.ru repositories - nncp.git/blobdiff - src/cmd/nncp-rm/main.go
Raise copyright years
[nncp.git] / src / cmd / nncp-rm / main.go
index b9ca28977c7380834393c7709cc585a9e95a1238..67f66574f1a9c5d48ced22f41c7a263c1861e306 100644 (file)
@@ -1,6 +1,6 @@
 /*
 NNCP -- Node to Node copy, utilities for store-and-forward data exchange
-Copyright (C) 2016-2021 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2022 Sergey Matveev <stargrave@stargrave.org>
 
 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