From 2cebb3e9d5b528f0a5d936f4fa70003a3edc524f Mon Sep 17 00:00:00 2001 From: Michiel Broek Date: Sat, 7 Dec 2002 15:33:47 +0000 Subject: [PATCH] unpacker doesn't complain about small files --- lib/unpacker.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/unpacker.c b/lib/unpacker.c index 47b664e9..1b76eec0 100644 --- a/lib/unpacker.c +++ b/lib/unpacker.c @@ -73,8 +73,11 @@ char *unpacker(char *fn) if ((fp = fopen(fn,"r"))) { fseek(fp, 257, SEEK_SET); - if (fread(buf,1,sizeof(buf),fp) != sizeof(buf)) { - WriteError("$Could not read position 257 of the file %s", fn); + if (fread(buf, 1, sizeof(buf), fp) != sizeof(buf)) { + /* + * Here we don't complain about a read error, the file may be + * smaller then 257 bytes so it is not a tar file anyway. + */ fclose(fp); return NULL; }