Ignore some generated files
[oweals/busybox.git] / tar.c
diff --git a/tar.c b/tar.c
index 7cfad72b513de3a9c8d9dc31ea5e4fb87ed21222..716f4ac3071c5fb8cf349212c3e59df39c050de6 100644 (file)
--- a/tar.c
+++ b/tar.c
 #include <stdlib.h>
 #include <unistd.h>
 #include "busybox.h"
-#define BB_DECLARE_EXTERN
-#define bb_need_io_error
-#define bb_need_name_longer_than_foo
-#include "messages.c"
 
 /* Tar file constants  */
 #ifndef MAJOR
@@ -710,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;