lrz in lrzsz-0.12.20(comms/lrzsz) sets invalid timestamp

When I send a file from Windows with Tera Term Pro and
	receive it by lrz on FreeBSD, the timestamp (modification
	time) of the received file is always set to 1991-Apr-20
	03:36:12 GMT (which may change according to compiler's
	optimization), neither the original file's timestamp nor
	the time that the file was transferred.

PR:		ports/49999
Submitted by:	IIJIMA Hiromitsu <delmonta@ht.sakura.ne.jp>
This commit is contained in:
Edwin Groothuis 2003-09-28 23:04:48 +00:00
parent 49dda8d028
commit a5b076053e
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=89728
2 changed files with 16 additions and 0 deletions

View file

@ -7,6 +7,7 @@
PORTNAME= lrzsz
PORTVERSION= 0.12.20
PORTREVISION= 1
CATEGORIES= comms
MASTER_SITES= http://www.ohse.de/uwe/releases/ \
http://www.netsw.org/net/modem/protocols/zmodem/lrzsz/

View file

@ -0,0 +1,15 @@
--- src/lrz.c.orig Sun Sep 28 16:02:13 2003
+++ src/lrz.c Sun Sep 28 16:02:34 2003
@@ -1159,9 +1159,9 @@
nameend = name + 1 + strlen(name);
if (*nameend) { /* file coming from Unix or DOS system */
- long modtime;
- long bytes_total;
- int mode;
+ long modtime=0;
+ long bytes_total=DEFBYTL;
+ int mode=0;
sscanf(nameend, "%ld%lo%o", &bytes_total, &modtime, &mode);
zi->modtime=modtime;
zi->bytes_total=bytes_total;