Logic bug in MVL/HOG/GRP archivers: these archives never contain subdirs...but they
authorRyan C. Gordon <icculus@icculus.org>
Wed, 28 Mar 2007 17:29:52 +0000
changeset 866 d790fca8f7f7
parent 865 616d4f93a5e9
child 867 ff3343429cb5
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.
CHANGELOG.txt
archivers/grp.c
archivers/hog.c
archivers/mvl.c
--- a/CHANGELOG.txt	Mon Mar 26 07:53:43 2007 +0000
+++ b/CHANGELOG.txt	Wed Mar 28 17:29:52 2007 +0000
@@ -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.
--- a/archivers/grp.c	Mon Mar 26 07:53:43 2007 +0000
+++ b/archivers/grp.c	Wed Mar 28 17:29:52 2007 +0000
@@ -295,7 +295,7 @@
                                const char *origdir, void *callbackdata)
 {
     /* no directories in GRP files. */
-    if (*dname != '\0')
+    if (*dname == '\0')
     {
         GRPinfo *info = (GRPinfo *) opaque;
         GRPentry *entry = info->entries;
--- a/archivers/hog.c	Mon Mar 26 07:53:43 2007 +0000
+++ b/archivers/hog.c	Wed Mar 28 17:29:52 2007 +0000
@@ -334,7 +334,7 @@
                                const char *origdir, void *callbackdata)
 {
     /* no directories in HOG files. */
-    if (*dname != '\0')
+    if (*dname == '\0')
     {
         HOGinfo *info = (HOGinfo *) opaque;
         HOGentry *entry = info->entries;
--- a/archivers/mvl.c	Mon Mar 26 07:53:43 2007 +0000
+++ b/archivers/mvl.c	Wed Mar 28 17:29:52 2007 +0000
@@ -291,7 +291,7 @@
                                const char *origdir, void *callbackdata)
 {
     /* no directories in MVL files. */
-    if (*dname != '\0')
+    if (*dname == '\0')
     {
         MVLinfo *info = ((MVLinfo *) opaque);
         MVLentry *entry = info->entries;