unpacker doesn't complain about small files
This commit is contained in:
parent
25f88b2a9f
commit
2cebb3e9d5
@ -73,8 +73,11 @@ char *unpacker(char *fn)
|
|||||||
|
|
||||||
if ((fp = fopen(fn,"r"))) {
|
if ((fp = fopen(fn,"r"))) {
|
||||||
fseek(fp, 257, SEEK_SET);
|
fseek(fp, 257, SEEK_SET);
|
||||||
if (fread(buf,1,sizeof(buf),fp) != sizeof(buf)) {
|
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);
|
fclose(fp);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user