diff options
author | Junio C Hamano <junkio@cox.net> | 2006-01-05 20:54:42 -0800 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-01-05 20:54:42 -0800 |
commit | 5df466c507ee2dd81c2e9002c3fedf3536cde0dc (patch) | |
tree | 92fff315690007bbbdaa9116570a8a49b01f5420 /apply.c | |
parent | 58e3fb40f7ca1c28f9105c15166884f80bb22e55 (diff) | |
parent | 92e802c6ccb96d1b5e8561b0a136d43d82253293 (diff) | |
download | git-5df466c507ee2dd81c2e9002c3fedf3536cde0dc.tar.gz git-5df466c507ee2dd81c2e9002c3fedf3536cde0dc.tar.xz |
Merge fixes up to GIT 1.0.7
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'apply.c')
-rw-r--r-- | apply.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1588,7 +1588,7 @@ static int try_create_file(const char *path, unsigned int mode, const char *buf, if (S_ISLNK(mode)) return symlink(buf, path); - fd = open(path, O_CREAT | O_EXCL | O_WRONLY | O_TRUNC, (mode & 0100) ? 0777 : 0666); + fd = open(path, O_CREAT | O_EXCL | O_WRONLY, (mode & 0100) ? 0777 : 0666); if (fd < 0) return -1; while (size) { @@ -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); } |