summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 757f58e)
raw | patch | inline | side by side (parent: 757f58e)
author | André Goddard Rosa <andre.goddard@gmail.com> | |
Wed, 21 Nov 2007 20:59:14 +0000 (18:59 -0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 26 Nov 2007 00:53:32 +0000 (16:53 -0800) |
When we fail to open a temporary file to be renamed to something else,
we reported the final filename, not the temporary file we failed to
open.
Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
we reported the final filename, not the temporary file we failed to
open.
Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
http-push.c | patch | blob | history | |
http-walker.c | patch | blob | history | |
server-info.c | patch | blob | history |
diff --git a/http-push.c b/http-push.c
index 66b81f17266569ee47d32ec58df9d1386e4d0431..78283b4de3b9111d87368df747daa96b5f6c09c3 100644 (file)
--- a/http-push.c
+++ b/http-push.c
packfile = fopen(request->tmpfile, "a");
if (!packfile) {
fprintf(stderr, "Unable to open local file %s for pack",
- filename);
+ request->tmpfile);
remote->can_update_info_refs = 0;
free(url);
return;
indexfile = fopen(tmpfile, "a");
if (!indexfile)
return error("Unable to open local file %s for pack index",
- filename);
+ tmpfile);
slot = get_active_slot();
slot->results = &results;
diff --git a/http-walker.c b/http-walker.c
index 444aebf5268c982255f73b151ff5c03bdffecdbe..a3fb596542eea6d85a6cb32add100e8d71e7713a 100644 (file)
--- a/http-walker.c
+++ b/http-walker.c
@@ -405,7 +405,7 @@ static int fetch_index(struct walker *walker, struct alt_base *repo, unsigned ch
indexfile = fopen(tmpfile, "a");
if (!indexfile)
return error("Unable to open local file %s for pack index",
- filename);
+ tmpfile);
slot = get_active_slot();
slot->results = &results;
@@ -770,7 +770,7 @@ static int fetch_pack(struct walker *walker, struct alt_base *repo, unsigned cha
packfile = fopen(tmpfile, "a");
if (!packfile)
return error("Unable to open local file %s for pack",
- filename);
+ tmpfile);
slot = get_active_slot();
slot->results = &results;
diff --git a/server-info.c b/server-info.c
index 0d1312ca56d52daa3fc692984d4d3abaf3425791..a051e49a9ea2f605bdc278394de731ff4c55e627 100644 (file)
--- a/server-info.c
+++ b/server-info.c
safe_create_leading_directories(path0);
info_ref_fp = fopen(path1, "w");
if (!info_ref_fp)
- return error("unable to update %s", path0);
+ return error("unable to update %s", path1);
for_each_ref(add_info_ref, NULL);
fclose(info_ref_fp);
adjust_shared_perm(path1);