mirror of
https://github.com/ziglang/zig.git
synced 2026-01-21 14:55:25 +00:00
std/fs/test.zig: Try harder to clean up locking files
This commit is contained in:
parent
c36962bb19
commit
d35bdc8ee7
@ -1559,11 +1559,11 @@ test "open file with exclusive nonblocking lock twice (absolute paths)" {
|
||||
const filename = try fs.path.resolve(gpa, &.{ cwd, sub_path });
|
||||
defer gpa.free(filename);
|
||||
|
||||
defer fs.deleteFileAbsolute(filename) catch {}; // createFileAbsolute can leave files on failures
|
||||
const file1 = try fs.createFileAbsolute(filename, .{
|
||||
.lock = .exclusive,
|
||||
.lock_nonblocking = true,
|
||||
});
|
||||
defer fs.deleteFileAbsolute(filename) catch {};
|
||||
|
||||
const file2 = fs.createFileAbsolute(filename, .{
|
||||
.lock = .exclusive,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user