Ignore some generated files
[oweals/busybox.git] / tar.c
diff --git a/tar.c b/tar.c
index 48284c00abf87f3a28b4edcfb3701158a9e823af..716f4ac3071c5fb8cf349212c3e59df39c050de6 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 (header.name[strlen(header.name)-1] != '/') {
+                               if (last_char_is(header.name,'/')) {
                                        if (tarExtractRegularFile(&header, extractFlag, tostdoutFlag)==FALSE)
                                                errorFlag=TRUE;
                                        break;