Explorar el Código

Logic bug in MVL/HOG/GRP archivers: these archives never contain subdirs...but they
only enumerated their files when looking in a directory other than the root,
instead of enumerating only for the root. Thanks to Chris Taylor for the
catch.

Ryan C. Gordon hace 19 años
padre
commit
1e6550292d
Se han modificado 4 ficheros con 6 adiciones y 3 borrados
  1. 3 0
      CHANGELOG.txt
  2. 1 1
      archivers/grp.c
  3. 1 1
      archivers/hog.c
  4. 1 1
      archivers/mvl.c

+ 3 - 0
CHANGELOG.txt

@@ -2,6 +2,9 @@
  * CHANGELOG.
  */
 
+03282007 - Logic bug in MVL/HOG/GRP archivers: only enumerated files when
+           looking in a directory other than the root, instead of enumerating
+           only for the root (thanks, Chris!).
 03262007 - Tons of Unicode work in windows.c ... should now use UCS-2 on
            NT/XP/Vista/etc versions of the OS, and fallback to "ANSI" versions
            for 95/98/ME, tapdancing around the system codepage if it has to.

+ 1 - 1
archivers/grp.c

@@ -295,7 +295,7 @@ static void GRP_enumerateFiles(dvoid *opaque, const char *dname,
                                const char *origdir, void *callbackdata)
 {
     /* no directories in GRP files. */
-    if (*dname != '\0')
+    if (*dname == '\0')
     {
         GRPinfo *info = (GRPinfo *) opaque;
         GRPentry *entry = info->entries;

+ 1 - 1
archivers/hog.c

@@ -334,7 +334,7 @@ static void HOG_enumerateFiles(dvoid *opaque, const char *dname,
                                const char *origdir, void *callbackdata)
 {
     /* no directories in HOG files. */
-    if (*dname != '\0')
+    if (*dname == '\0')
     {
         HOGinfo *info = (HOGinfo *) opaque;
         HOGentry *entry = info->entries;

+ 1 - 1
archivers/mvl.c

@@ -291,7 +291,7 @@ static void MVL_enumerateFiles(dvoid *opaque, const char *dname,
                                const char *origdir, void *callbackdata)
 {
     /* no directories in MVL files. */
-    if (*dname != '\0')
+    if (*dname == '\0')
     {
         MVLinfo *info = ((MVLinfo *) opaque);
         MVLentry *entry = info->entries;