From 0e55181f29ee6599ab6888ac54d186c83d355a70 Mon Sep 17 00:00:00 2001 From: Nicolas Pitre Date: Sat, 24 Mar 2007 11:58:22 -0400 Subject: make it more obvious that temporary files are temporary files When some operations are interrupted (or "die()'d" or crashed) then the partial object/pack/index file may remain around. Make it more obvious in their name that those files are temporary stuff and can be cleaned up if no operation is in progress. Signed-off-by: Nicolas Pitre Signed-off-by: Junio C Hamano --- fast-import.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'fast-import.c') diff --git a/fast-import.c b/fast-import.c index 55ffae4fa..bea12151c 100644 --- a/fast-import.c +++ b/fast-import.c @@ -630,7 +630,7 @@ static void start_packfile(void) int pack_fd; snprintf(tmpfile, sizeof(tmpfile), - "%s/pack_XXXXXX", get_object_directory()); + "%s/tmp_pack_XXXXXX", get_object_directory()); pack_fd = mkstemp(tmpfile); if (pack_fd < 0) die("Can't create %s: %s", tmpfile, strerror(errno)); @@ -730,7 +730,7 @@ static char *create_index(void) } snprintf(tmpfile, sizeof(tmpfile), - "%s/index_XXXXXX", get_object_directory()); + "%s/tmp_idx_XXXXXX", get_object_directory()); idx_fd = mkstemp(tmpfile); if (idx_fd < 0) die("Can't create %s: %s", tmpfile, strerror(errno)); -- cgit v1.2.1