#include "mathlib.h"
#include "inout.h"
#include "vfs.h"
-#include "unzip.h"
+#include <minizip/unzip.h>
typedef struct
{
char* name;
- unz_s zipinfo;
unzFile zipfile;
guint32 size;
} VFS_PAKFILE;
file->name = strdup( filename_inzip );
file->size = file_info.uncompressed_size;
file->zipfile = uf;
- memcpy( &file->zipinfo, uf, sizeof( unz_s ) );
if ( ( i + 1 ) < gi.number_entry ) {
err = unzGoToNextFile( uf );
{
char *ext = strrchr( dirlist, '.' );
- if ( ext && !Q_stricmp( ext, ".pk3dir" ) ) {
+ if ( ext && ( !Q_stricmp( ext, ".pk3dir" ) || !Q_stricmp( ext, ".dpkdir" ) ) ) {
if ( g_numDirs == VFS_MAXDIRS ) {
continue;
}
++g_numDirs;
}
- if ( ( ext == NULL ) || ( Q_stricmp( ext, ".pk3" ) != 0 ) ) {
+ if ( ( ext == NULL ) || ( Q_stricmp( ext, ".pk3" ) != 0 || !Q_stricmp( ext, ".dpk" ) != 0 ) ) {
continue;
}
}
}
if ( count == index ) {
- memcpy( file->zipfile, &file->zipinfo, sizeof( unz_s ) );
if ( unzOpenCurrentFile( file->zipfile ) != UNZ_OK ) {
return -1;