Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
git-cvsimport: force checkout of working tree after initial import
[gitweb.git]
/
builtin-init-db.c
diff --git
a/builtin-init-db.c
b/builtin-init-db.c
index 0be2d2ef6eec3e5830e893795cf9219851611859..976f47b3233cf0aba34e104bb4524aace40dccba 100644
(file)
--- a/
builtin-init-db.c
+++ b/
builtin-init-db.c
@@
-40,7
+40,8
@@
static int copy_file(const char *dst, const char *src, int mode)
return fdo;
}
status = copy_fd(fdi, fdo);
- close(fdo);
+ if (close(fdo) != 0)
+ return error("%s: write error: %s", dst, strerror(errno));
if (!status && adjust_shared_perm(dst))
return -1;