From b2e2f282bdadf16b9a31bb1d544ea5092180bee3 Mon Sep 17 00:00:00 2001 From: matt Date: Fri, 13 Feb 2004 00:11:30 +0000 Subject: [PATCH] Back out last change. Since the name is the entire path, prefixing it with a '.' will not have the desired effect. --- bin/pax/file_subs.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/bin/pax/file_subs.c b/bin/pax/file_subs.c index 3bc29cc0c274..7a56cd501d47 100644 --- a/bin/pax/file_subs.c +++ b/bin/pax/file_subs.c @@ -1,4 +1,4 @@ -/* $NetBSD: file_subs.c,v 1.38 2004/02/13 00:07:55 matt Exp $ */ +/* $NetBSD: file_subs.c,v 1.39 2004/02/13 00:11:30 matt Exp $ */ /*- * Copyright (c) 1992 Keith Muller. @@ -42,7 +42,7 @@ #if 0 static char sccsid[] = "@(#)file_subs.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: file_subs.c,v 1.38 2004/02/13 00:07:55 matt Exp $"); +__RCSID("$NetBSD: file_subs.c,v 1.39 2004/02/13 00:11:30 matt Exp $"); #endif #endif /* not lint */ @@ -91,13 +91,12 @@ file_creat(ARCHD *arcn) * Create a temporary file name so that the file doesn't have partial * contents while restoring. */ - arcn->tmp_name = malloc(arcn->nlen + 9); + arcn->tmp_name = malloc(arcn->nlen + 8); if (arcn->tmp_name == NULL) { - syswarn(1, errno, "Cannot malloc %d bytes", arcn->nlen + 9); + syswarn(1, errno, "Cannot malloc %d bytes", arcn->nlen + 8); return(-1); } - (void)snprintf(arcn->tmp_name, arcn->nlen + 9, ".%s.XXXXXX", - arcn->name); + (void)snprintf(arcn->tmp_name, arcn->nlen + 8, "%s.XXXXXX", arcn->name); fd = mkstemp(arcn->tmp_name); if (fd >= 0)