From 603785f783bf74352ce15e5ca1b6d857aa47836f Mon Sep 17 00:00:00 2001 From: Ed Avis Date: Wed, 19 May 2010 14:35:39 +0100 Subject: [PATCH] Put tempfiles in /tmp rather than current directory. --- main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.c b/main.c index e90c396..925a70f 100644 --- a/main.c +++ b/main.c @@ -148,8 +148,8 @@ static int open_tmpoutfile(void) if ((control.flags & FLAG_STDOUT) && (control.flags & FLAG_VERBOSE)) fprintf(control.msgout, "Outputting to stdout.\n"); - control.outfile = realloc(NULL, 16); - strcpy(control.outfile, "lrzipout.XXXXXX"); + control.outfile = realloc(NULL, 21); + strcpy(control.outfile, "/tmp/lrzipout.XXXXXX"); if (!control.outfile) fatal("Failed to allocate outfile name\n"); @@ -185,8 +185,8 @@ static int open_tmpinfile(void) { int fd_in; - control.infile = malloc(15); - strcpy(control.infile, "lrzipin.XXXXXX"); + control.infile = malloc(21); + strcpy(control.infile, "/tmp/lrzipin.XXXXXX"); if (!control.infile) fatal("Failed to allocate infile name\n");