unpacker doesn't complain about small files

This commit is contained in:
Michiel Broek 2002-12-07 15:33:47 +00:00
parent 25f88b2a9f
commit 2cebb3e9d5

View File

@ -74,7 +74,10 @@ 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);
/*
* 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;
}