zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 016e87e7efa0311fe360ca2f0ba2a6fa583b3fda (tree)
parent 5490021ab7d97425a44b78e218b5462f960d9c9d
Author: Ryan Liptak <squeek502@hotmail.com>
Date:   Tue,  4 Jun 2024 18:44:51 -0700

fs tests: Fix leaking a directory handle in "makepath existing directories" test

Diffstat:
Mlib/std/fs/test.zig | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/std/fs/test.zig b/lib/std/fs/test.zig @@ -1161,7 +1161,8 @@ test "makepath existing directories" { defer tmp.cleanup(); try tmp.dir.makeDir("A"); - const tmpA = try tmp.dir.openDir("A", .{}); + var tmpA = try tmp.dir.openDir("A", .{}); + defer tmpA.close(); try tmpA.makeDir("B"); const testPath = "A" ++ fs.path.sep_str ++ "B" ++ fs.path.sep_str ++ "C";