From 83824f14360f92f8a3a47ac5f136bb077b141065 Mon Sep 17 00:00:00 2001 From: "Thomas E. Dickey" Date: Tue, 29 Jun 1999 13:01:29 -0400 Subject: snapshot of project "lynx", label v2-8-3_3 --- src/LYShowInfo.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/LYShowInfo.c') diff --git a/src/LYShowInfo.c b/src/LYShowInfo.c index 56340c16..d7389761 100644 --- a/src/LYShowInfo.c +++ b/src/LYShowInfo.c @@ -33,7 +33,7 @@ PUBLIC int showinfo ARGS4( document *, newdoc, char *, owner_address) { - static char tempfile[LY_MAXPATH]; + static char tempfile[LY_MAXPATH] = "\0"; int url_type; FILE *fp0; char *Address = NULL, *Title = NULL; @@ -48,8 +48,13 @@ PUBLIC int showinfo ARGS4( struct stat dir_info; #endif /* DIRED_SUPPORT */ - LYRemoveTemp(tempfile); - if ((fp0 = LYOpenTemp (tempfile, HTML_SUFFIX, "w")) == 0) { + if (LYReuseTempfiles) { + fp0 = LYOpenTempRewrite(tempfile, HTML_SUFFIX, "w"); + } else { + LYRemoveTemp(tempfile); + fp0 = LYOpenTemp(tempfile, HTML_SUFFIX, "w"); + } + if (fp0 == NULL) { HTAlert(CANNOT_OPEN_TEMP); return(-1); } -- cgit 1.4.1-2-gfad0