diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 1999-06-29 13:01:29 -0400 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 1999-06-29 13:01:29 -0400 |
commit | 83824f14360f92f8a3a47ac5f136bb077b141065 (patch) | |
tree | 9b21f7145d93e54ad67f57e8807f20493dfcbc3d /src/LYShowInfo.c | |
parent | 5be99e2ee1a17028574fcbd90b9ba2c09555585e (diff) | |
download | lynx-snapshots-83824f14360f92f8a3a47ac5f136bb077b141065.tar.gz |
snapshot of project "lynx", label v2-8-3_3
Diffstat (limited to 'src/LYShowInfo.c')
-rw-r--r-- | src/LYShowInfo.c | 11 |
1 files changed, 8 insertions, 3 deletions
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); } |