Skip to content

Commit d35bdc8

Browse files
committed
std/fs/test.zig: Try harder to clean up locking files
1 parent c36962b commit d35bdc8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/std/fs/test.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1559,11 +1559,11 @@ test "open file with exclusive nonblocking lock twice (absolute paths)" {
15591559
const filename = try fs.path.resolve(gpa, &.{ cwd, sub_path });
15601560
defer gpa.free(filename);
15611561

1562+
defer fs.deleteFileAbsolute(filename) catch {}; // createFileAbsolute can leave files on failures
15621563
const file1 = try fs.createFileAbsolute(filename, .{
15631564
.lock = .exclusive,
15641565
.lock_nonblocking = true,
15651566
});
1566-
defer fs.deleteFileAbsolute(filename) catch {};
15671567

15681568
const file2 = fs.createFileAbsolute(filename, .{
15691569
.lock = .exclusive,

0 commit comments

Comments
 (0)