OSDN Git Service
(root)
/
git-core
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e23ed9a
)
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
diff --git
a/sha1_file.c
b/sha1_file.c
index
5fcad28
..
27eb14b
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;
}