Skip to content

Commit

Permalink
#442 Remove file attributes check
Browse files Browse the repository at this point in the history
  • Loading branch information
srikanth-lingala committed Jun 23, 2022
1 parent 7b586be commit 4e13a75
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions src/main/java/net/lingala/zip4j/util/FileUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,6 @@ public static List<File> getFilesInDirectoryRecursive(File path, ZipParameters z
}

for (File file : filesAndDirs) {
if (!isFileRegularOrDirectoryOrSymlink(file)) {
continue;
}

if (zipParameters.getExcludeFileFilter() != null && zipParameters.getExcludeFileFilter().isExcluded(file)) {
continue;
}
Expand Down Expand Up @@ -595,11 +591,4 @@ private static void addIfBitSet(byte b, int pos, Set<PosixFilePermission> 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);
}
}

0 comments on commit 4e13a75

Please sign in to comment.