From 03cccce553db31a8f1b9d109aebf78f78d7089e7 Mon Sep 17 00:00:00 2001 From: Fumitoshi UKAI Date: Fri, 10 Jan 2003 16:33:38 +0000 Subject: [w3m-dev 03628] Re: Error occured while reset * file.c (doExternal): bufp = NULL, return 1 (uncompress_stream): tempfname fileToDelete From: Hironori SAKAMOTO --- file.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'file.c') diff --git a/file.c b/file.c index cd63488..27dfce0 100644 --- a/file.c +++ b/file.c @@ -1,4 +1,4 @@ -/* $Id: file.c,v 1.180 2003/01/10 16:16:45 ukai Exp $ */ +/* $Id: file.c,v 1.181 2003/01/10 16:33:46 ukai Exp $ */ #include "fm.h" #include #include "myctype.h" @@ -7393,9 +7393,10 @@ doExternal(URLFile uf, char *path, char *type, Buffer **bufp, else #endif { - if (save2tmp(uf, tmpf->ptr) < 0) - return 0; /* ??? */ - UFclose(&uf); + if (save2tmp(uf, tmpf->ptr) < 0) { + *bufp = NULL; + return 1; + } } if (mcap->flags & (MAILCAP_HTMLOUTPUT | MAILCAP_COPIOUSOUTPUT)) { if (defaultbuf == NULL) @@ -7789,6 +7790,7 @@ uncompress_stream(URLFile *uf, char **src) if (uf->scheme != SCM_LOCAL) { tmpf = tmpfname(TMPF_DFL, ext)->ptr; + pushText(fileToDelete, tmpf); if (save2tmp(*uf, tmpf) < 0) { UFclose(uf); return; @@ -7801,7 +7803,6 @@ uncompress_stream(URLFile *uf, char **src) *src = tmpf; else uf->scheme = SCM_LOCAL; - pushText(fileToDelete, tmpf); } flush_tty(); -- cgit v1.2.3