diff options
Diffstat (limited to 'builtin')
| -rw-r--r-- | builtin/fast-import.c | 3 | ||||
| -rw-r--r-- | builtin/index-pack.c | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/builtin/fast-import.c b/builtin/fast-import.c index c1e198f4e3..b2839c5f43 100644 --- a/builtin/fast-import.c +++ b/builtin/fast-import.c @@ -811,7 +811,8 @@ static char *keep_pack(const char *curr_index_name) int keep_fd; odb_pack_name(pack_data->repo, &name, pack_data->hash, "keep"); - keep_fd = odb_pack_keep(name.buf); + keep_fd = safe_create_file_with_leading_directories(pack_data->repo, + name.buf); if (keep_fd < 0) die_errno("cannot create keep file"); write_or_die(keep_fd, keep_msg, strlen(keep_msg)); diff --git a/builtin/index-pack.c b/builtin/index-pack.c index 60a8ee05db..f49431d626 100644 --- a/builtin/index-pack.c +++ b/builtin/index-pack.c @@ -1565,7 +1565,7 @@ static void write_special_file(const char *suffix, const char *msg, else filename = odb_pack_name(the_repository, &name_buf, hash, suffix); - fd = odb_pack_keep(filename); + fd = safe_create_file_with_leading_directories(the_repository, filename); if (fd < 0) { if (errno != EEXIST) die_errno(_("cannot write %s file '%s'"), |
