From: Alex Riesen Date: Thu, 5 Jan 2006 09:00:12 +0000 (+0100) Subject: fix potential deadlock in create_one_file X-Git-Tag: v1.0.7^2~17 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=d9e08be9d5b632aed84d4ee870543babafe6614b;p=git.git fix potential deadlock in create_one_file It can happen if the temporary file already exists (i.e. after a panic and reboot). Signed-off-by: Alex Riesen Signed-off-by: Junio C Hamano --- diff --git a/apply.c b/apply.c index 9eba034e..c471a82e 100644 --- a/apply.c +++ b/apply.c @@ -1635,7 +1635,8 @@ static void create_one_file(const char *path, unsigned mode, const char *buf, un } if (errno != EEXIST) break; - } + ++nr; + } } die("unable to write file %s mode %o", path, mode); }