Subversion Repositories SvarDOS

Compare Revisions

Ignore whitespace Rev 294 → Rev 295

/pkg/libunzip.c
173,8 → 173,8
 
/* first of all, check we support the compression method */
switch (curzipnode->compmethod) {
case 0: /* stored */
case 8: /* deflated */
case ZIP_METH_STORE:
case ZIP_METH_DEFLATE:
break;
default: /* unsupported compression method, sorry */
return(-1);
/pkg/libunzip.h
16,6 → 16,9
#define ZIP_FLAG_ISADIR 1
#define ZIP_FLAG_ENCRYPTED 2
 
#define ZIP_METH_STORE 0
#define ZIP_METH_DEFLATE 8
 
struct ziplist {
long filelen;
long compressedfilelen;
23,7 → 26,7
long dataoffset; /* offset in the file where compressed data starts */
struct ziplist *nextfile;
time_t timestamp; /* the timestamp of the file */
short compmethod;
short compmethod; /* compression method (ZIP_METH_xxx) */
unsigned char flags; /* see ZIP_FLAG_xxx above */
char filename[1]; /* must be last element (gets expanded at runtime) */
};
/pkg/pkginst.c
178,7 → 178,7
goto RAII_ERR;
}
/* abort if any file is compressed with an unsupported method */
if ((curzipnode->compmethod != 0/*store*/) && (curzipnode->compmethod != 8/*deflate*/)) { /* unsupported compression method */
if ((curzipnode->compmethod != ZIP_METH_STORE) && (curzipnode->compmethod != ZIP_METH_DEFLATE)) { /* unsupported compression method */
kitten_printf(8, 2, "ERROR: Package contains a file compressed with an unsupported method (%d):", curzipnode->compmethod);
puts("");
printf(" %s\n", curzipnode->filename);