X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=targets.go;h=5d2342e884ea68f6ac537b85b4dda1b29fcf73c4;hb=b4eefdd675c9aef9ff8bd1089d031ee05733195b;hp=0545483752bda04c4ac1347cb16421ee46215c98;hpb=ca5290c19761bc1806b98d54d966a9cbbfeabd15;p=goredo.git diff --git a/targets.go b/targets.go index 0545483..5d2342e 100644 --- a/targets.go +++ b/targets.go @@ -1,6 +1,6 @@ /* goredo -- djb's redo implementation on pure Go -Copyright (C) 2020-2021 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) {