authorgravatar for pat.github@tullmann.orgPat Tullmann <pat.github@tullmann.org> 2024-01-06 13:27:59-08:00
committergravatar for pat.github@tullmann.orgPat Tullmann <pat.github@tullmann.org> 2024-01-16 14:19:48-08:00
logd35bdc8ee7e414caec619488691a22e4d79aae14
treee570e0e2a414d5d275cf2c5ce5fb3f2ed953d7ed
parentc36962bb197abf66e2eb94068dc2a53b098fff9d

std/fs/test.zig: Try harder to clean up locking files


1 files changed, 1 insertions(+), 1 deletions(-)

lib/std/fs/test.zig+1-1
...@@ -1559,11 +1559,11 @@ test "open file with exclusive nonblocking lock twice (absolute paths)" {...@@ -1559,11 +1559,11 @@ test "open file with exclusive nonblocking lock twice (absolute paths)" {
1559 const filename = try fs.path.resolve(gpa, &.{ cwd, sub_path });1559 const filename = try fs.path.resolve(gpa, &.{ cwd, sub_path });
1560 defer gpa.free(filename);1560 defer gpa.free(filename);
15611561
1562 defer fs.deleteFileAbsolute(filename) catch {}; // createFileAbsolute can leave files on failures
1562 const file1 = try fs.createFileAbsolute(filename, .{1563 const file1 = try fs.createFileAbsolute(filename, .{
1563 .lock = .exclusive,1564 .lock = .exclusive,
1564 .lock_nonblocking = true,1565 .lock_nonblocking = true,
1565 });1566 });
1566 defer fs.deleteFileAbsolute(filename) catch {};
15671567
1568 const file2 = fs.createFileAbsolute(filename, .{1568 const file2 = fs.createFileAbsolute(filename, .{
1569 .lock = .exclusive,1569 .lock = .exclusive,