From 26a8e37fdcab433c8e623b29fb35c0907b2a05de Mon Sep 17 00:00:00 2001 From: Fumitoshi UKAI Date: Sat, 14 Dec 2002 15:18:37 +0000 Subject: [w3m-dev 03568] Re: preserve timestamp * etc.c (USE_COOKIE): moved * file.c (utime.h): include (setModtime): added (loadGeneralFile): set f.modtime (_doFileCopy): setModtime() (doFileSave): setModtime() * ftp.c (getFtpModtime): added (openFTP): pass URLFile, set modtime * html.h (URLFile): add modtime * proto.h (openFTP): arg URLFile *uf (mymktime): always * url.c (init_stream): initialize modtime (openFTPStream): pass URLFile (openURL): openFTPStream From: Takahashi Youichirou --- url.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'url.c') diff --git a/url.c b/url.c index 03e4c2f..fd328c3 100644 --- a/url.c +++ b/url.c @@ -1,4 +1,4 @@ -/* $Id: url.c,v 1.58 2002/11/18 17:32:33 ukai Exp $ */ +/* $Id: url.c,v 1.59 2002/12/14 15:18:39 ukai Exp $ */ #include "fm.h" #include #include @@ -1412,12 +1412,13 @@ init_stream(URLFile *uf, int scheme, InputStream stream) uf->compression = 0; uf->guess_type = NULL; uf->ext = NULL; + uf->modtime = -1; } static InputStream -openFTPStream(ParsedURL *pu) +openFTPStream(ParsedURL *pu, URLFile *uf) { - return newFileStream(openFTP(pu), closeFTP); + return newFileStream(openFTP(pu, uf), closeFTP); } URLFile @@ -1587,7 +1588,7 @@ openURL(char *url, ParsedURL *pu, ParsedURL *current, write(sock, tmp->ptr, tmp->length); } else { - uf.stream = openFTPStream(pu); + uf.stream = openFTPStream(pu, &uf); uf.scheme = pu->scheme; return uf; } -- cgit v1.2.3