projects
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9dad9d2
)
link_temp_to_file: don't leave the path truncated on adjust_shared_perm failure
author
Junio C Hamano
<junkio@cox.net>
Tue, 31 Oct 2006 23:56:58 +0000
(15:56 -0800)
committer
Junio C Hamano
<junkio@cox.net>
Tue, 31 Oct 2006 23:56:58 +0000
(15:56 -0800)
Signed-off-by: Junio C Hamano <junkio@cox.net>
sha1_file.c
patch
|
blob
|
history
diff --git
a/sha1_file.c
b/sha1_file.c
index 47e2a29abd6d2ae067d72c0f73bcf4e6afe0a938..5fcad2893fec7739262b06e2883ee3c261768099 100644
(file)
--- a/
sha1_file.c
+++ b/
sha1_file.c
@@
-1383,8
+1383,10
@@
static int link_temp_to_file(const char *tmpfile, const char *filename)
if (dir) {
*dir = 0;
mkdir(filename, 0777);
- if (adjust_shared_perm(filename))
+ if (adjust_shared_perm(filename)) {
+ *dir = '/';
return -2;
+ }
*dir = '/';
if (!link(tmpfile, filename))
return 0;