X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=targets.go;h=5d2342e884ea68f6ac537b85b4dda1b29fcf73c4;hb=74314d342446be5c0db2b00f067a7f135f66ddb6;hp=af4e4dae9326410a9d0754bcb7851e53f5605e30;hpb=0030b3e73152bf9d9ad3e435fa42e607c7865321;p=goredo.git diff --git a/targets.go b/targets.go index af4e4da..5d2342e 100644 --- a/targets.go +++ b/targets.go @@ -1,6 +1,6 @@ /* goredo -- djb's redo implementation on pure Go -Copyright (C) 2020-2022 Sergey Matveev +Copyright (C) 2020-2023 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 @@ -54,6 +54,7 @@ func targetsCollect(root string, tgts map[string]struct{}) error { return err } redoFis, err := redoDir.Readdir(0) + redoDir.Close() if err != nil { return err } @@ -64,7 +65,6 @@ func targetsCollect(root string, tgts map[string]struct{}) error { tgts[name[:len(name)-len(DepSuffix)]] = struct{}{} } } - redoDir.Close() } else { if err = targetsCollect(pth, tgts); err != nil { return err @@ -72,7 +72,7 @@ func targetsCollect(root string, tgts map[string]struct{}) error { } } } - return dir.Close() + return nil } func targetsWalker(tgts []string) ([]string, error) {