archivers/zip.c
changeset 754 e7cd7411eadf
parent 715 d6bf881b6e1e
child 767 db29bf06d171
--- a/archivers/zip.c	Fri Sep 09 20:35:18 2005 +0000
+++ b/archivers/zip.c	Sun Sep 18 21:44:42 2005 +0000
@@ -1178,8 +1178,8 @@
  * Moved to seperate function so we can use alloca then immediately throw
  *  away the allocated stack space...
  */
-static void doEnumCallback(PHYSFS_StringCallback cb, void *callbackdata,
-                           const char *str, PHYSFS_sint32 ln)
+static void doEnumCallback(PHYSFS_EnumFilesCallback cb, void *callbackdata,
+                           const char *odir, const char *str, PHYSFS_sint32 ln)
 {
     char *newstr = alloca(ln + 1);
     if (newstr == NULL)
@@ -1187,13 +1187,13 @@
 
     memcpy(newstr, str, ln);
     newstr[ln] = '\0';
-    cb(callbackdata, newstr);
+    cb(callbackdata, odir, newstr);
 } /* doEnumCallback */
 
 
 static void ZIP_enumerateFiles(dvoid *opaque, const char *dname,
-                               int omitSymLinks, PHYSFS_StringCallback cb,
-                               void *callbackdata)
+                               int omitSymLinks, PHYSFS_EnumFilesCallback cb,
+                               const char *origdir, void *callbackdata)
 {
     ZIPinfo *info = ((ZIPinfo *) opaque);
     PHYSFS_sint32 dlen, dlen_inc, max, i;
@@ -1221,7 +1221,7 @@
             char *add = e + dlen_inc;
             char *ptr = strchr(add, '/');
             PHYSFS_sint32 ln = (PHYSFS_sint32) ((ptr) ? ptr-add : strlen(add));
-            doEnumCallback(cb, callbackdata, add, ln);
+            doEnumCallback(cb, callbackdata, origdir, add, ln);
             ln += dlen_inc;  /* point past entry to children... */
 
             /* increment counter and skip children of subdirs... */