Repositories / jai.git
jai.git
Clone (read-only): git clone http://git.guha-anderson.com/git/jai.git
@@ -453,7 +453,8 @@ ensure_file(int dfd, path file, std::string_view contents, int mode) unlinkat(dfd, tmp.c_str(), 0); Defer cleanup{[dfd, &tmp] { unlinkat(dfd, tmp.c_str(), 0); }}; - Fd fd = xopenat(dfd, tmp.c_str(), O_CREAT | O_EXCL | O_WRONLY | O_CLOEXEC); + Fd fd = xopenat(dfd, tmp.c_str(), O_CREAT | O_EXCL | O_WRONLY | O_CLOEXEC, + mode); for (size_t i = 0; i < contents.size();) { if (auto n = write(*fd, contents.data() + i, contents.size() - i); n < 0) syserr(R"(write(O_TMPFILE for "{}"))", fdpath(dfd, file));
@@ -1061,7 +1061,7 @@ The default is CMD.conf if it exists, otherwise default.conf)", } ensure_file(conf.home_jai(), ".defaults", jai_defaults, 0600); - ensure_file(conf.home_jai(), "default.conf", jai_defaults, 0600); + ensure_file(conf.home_jai(), "default.conf", default_conf, 0600); if (!opt_C.empty()) { if (!conf.parse_config_file(opt_C))