Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
link_temp_to_file: call adjust_shared_perm() only when we created the directory
author
Johannes Schindelin
<Johannes.Schindelin@gmx.de>
Fri, 3 Nov 2006 02:02:17 +0000
(18:02 -0800)
committer
Junio C Hamano
<junkio@cox.net>
Fri, 3 Nov 2006 02:02:17 +0000
(18:02 -0800)
sha1_file.c
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
e23ed9a
)
diff --git
a/sha1_file.c
b/sha1_file.c
index 5fcad2893fec7739262b06e2883ee3c261768099..27eb14b92240b2f8b99ebf10bb4a6f8c00a02e5b 100644
(file)
--- a/
sha1_file.c
+++ b/
sha1_file.c
@@
-1382,8
+1382,7
@@
static int link_temp_to_file(const char *tmpfile, const char *filename)
dir = strrchr(filename, '/');
if (dir) {
*dir = 0;
- mkdir(filename, 0777);
- if (adjust_shared_perm(filename)) {
+ if (!mkdir(filename, 0777) && adjust_shared_perm(filename)) {
*dir = '/';
return -2;
}