Logic reversal for last_char_is
authorGlenn L McGrath <bug1@ihug.co.nz>
Sun, 29 Apr 2001 00:50:33 +0000 (00:50 -0000)
committerGlenn L McGrath <bug1@ihug.co.nz>
Sun, 29 Apr 2001 00:50:33 +0000 (00:50 -0000)
archival/tar.c
tar.c

index 716f4ac3071c5fb8cf349212c3e59df39c050de6..c168564ca8b3751d9599e32ef0fc1962989576e5 100644 (file)
@@ -706,7 +706,7 @@ static int readTarFile(int tarFd, int extractFlag, int listFlag,
                        case REGTYPE0:
                                /* If the name ends in a '/' then assume it is
                                 * supposed to be a directory, and fall through */
-                               if (last_char_is(header.name,'/')) {
+                               if (!last_char_is(header.name,'/')) {
                                        if (tarExtractRegularFile(&header, extractFlag, tostdoutFlag)==FALSE)
                                                errorFlag=TRUE;
                                        break;
diff --git a/tar.c b/tar.c
index 716f4ac3071c5fb8cf349212c3e59df39c050de6..c168564ca8b3751d9599e32ef0fc1962989576e5 100644 (file)
--- a/tar.c
+++ b/tar.c
@@ -706,7 +706,7 @@ static int readTarFile(int tarFd, int extractFlag, int listFlag,
                        case REGTYPE0:
                                /* If the name ends in a '/' then assume it is
                                 * supposed to be a directory, and fall through */
-                               if (last_char_is(header.name,'/')) {
+                               if (!last_char_is(header.name,'/')) {
                                        if (tarExtractRegularFile(&header, extractFlag, tostdoutFlag)==FALSE)
                                                errorFlag=TRUE;
                                        break;