diff options
-rw-r--r-- | receive-pack.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/receive-pack.c b/receive-pack.c index 8d6faaaa9c..9026f1bf82 100644 --- a/receive-pack.c +++ b/receive-pack.c @@ -106,6 +106,8 @@ static int update(const char *name, return error("unpack should have generated %s, " "but I can't find it!", new_hex); + safe_create_leading_directories(lock_name); + newfd = open(lock_name, O_CREAT | O_EXCL | O_WRONLY, 0666); if (newfd < 0) return error("unable to create %s (%s)", |