X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=targets.go;h=334de9c847ee9520df24c93fb02bdf91dbcc44e2;hb=19b13ea1334d377dd9c6a36ea70c9141b8fd447d;hp=af4e4dae9326410a9d0754bcb7851e53f5605e30;hpb=0030b3e73152bf9d9ad3e435fa42e607c7865321;p=goredo.git diff --git a/targets.go b/targets.go index af4e4da..334de9c 100644 --- a/targets.go +++ b/targets.go @@ -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) {