From 4e13a75aeb95c800fd21249b3dd9f70038e6dfa4 Mon Sep 17 00:00:00 2001 From: Srikanth Reddy Lingala Date: Thu, 23 Jun 2022 09:03:07 -0400 Subject: [PATCH] #442 Remove file attributes check --- src/main/java/net/lingala/zip4j/util/FileUtils.java | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/main/java/net/lingala/zip4j/util/FileUtils.java b/src/main/java/net/lingala/zip4j/util/FileUtils.java index ce08084e..b6206c4a 100644 --- a/src/main/java/net/lingala/zip4j/util/FileUtils.java +++ b/src/main/java/net/lingala/zip4j/util/FileUtils.java @@ -110,10 +110,6 @@ public static List getFilesInDirectoryRecursive(File path, ZipParameters z } for (File file : filesAndDirs) { - if (!isFileRegularOrDirectoryOrSymlink(file)) { - continue; - } - if (zipParameters.getExcludeFileFilter() != null && zipParameters.getExcludeFileFilter().isExcluded(file)) { continue; } @@ -595,11 +591,4 @@ private static void addIfBitSet(byte b, int pos, Set posixF posixFilePermissions.add(posixFilePermissionToAdd); } } - - private static boolean isFileRegularOrDirectoryOrSymlink(File file) { - byte[] fileAttributes = getFileAttributes(file); - return BitUtils.isBitSet(fileAttributes[3], 5) - || BitUtils.isBitSet(fileAttributes[3], 6) - || BitUtils.isBitSet(fileAttributes[3], 7); - } }