mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-04-26 13:01:34 +03:00
fuzz: don't err if .zig-cache/tmp doesn't exist
If we have just created cache_dir_path, then there's no `tmp` dir
there, and
cache_dir.createFile(io, "tmp/libfuzzer.log", .{ .truncate = false })
fails.
Tested via
$ zig version
0.16.0
$ zig build --zig-lib-dir ~/p/zig/lib/ --fuzz
This commit is contained in:
@@ -171,6 +171,8 @@ const Executable = struct {
|
||||
|
||||
const cache_dir = Io.Dir.cwd().createDirPathOpen(io, cache_dir_path, .{}) catch |e|
|
||||
panic("failed to open directory '{s}': {t}", .{ cache_dir_path, e });
|
||||
cache_dir.createDirPath(io, "tmp") catch |e|
|
||||
panic("failed to create directory 'tmp': {t}", .{e});
|
||||
log_f = cache_dir.createFile(io, "tmp/libfuzzer.log", .{ .truncate = false }) catch |e|
|
||||
panic("failed to create file 'tmp/libfuzzer.log': {t}", .{e});
|
||||
self.cache_f = cache_dir.createDirPathOpen(io, "f", .{}) catch |e|
|
||||
|
||||
Reference in New Issue
Block a user