unix2db: use correct file permissions

This commit is contained in:
Motiejus Jakštys 2022-07-06 11:30:50 +03:00
parent cb9250010e
commit 97dde99d5e

View File

@ -101,7 +101,7 @@ fn execute(
return fail(errc.wrap("construct DB from corpus"), stderr, err); return fail(errc.wrap("construct DB from corpus"), stderr, err);
defer db.deinit(allocator); defer db.deinit(allocator);
const fd = os.open(out_fname, os.O.WRONLY | os.O.TRUNC | os.O.CREAT, 0644) catch |err| const fd = os.open(out_fname, os.O.WRONLY | os.O.TRUNC | os.O.CREAT, 0o644) catch |err|
return fail(errc.wrapf("open for writing {s}", .{out_fname}), stderr, err); return fail(errc.wrapf("open for writing {s}", .{out_fname}), stderr, err);
errdefer os.close(fd); errdefer os.close(fd);