Skip to content

Commit

Permalink
#315 Flip file name directory check
Browse files Browse the repository at this point in the history
  • Loading branch information
srikanth-lingala committed May 23, 2021
1 parent cd37bb5 commit f31f930
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ private boolean shouldEntryBeRemoved(FileHeader fileHeaderToBeChecked, List<Stri
for (String fileNameToBeRemoved : fileNamesToBeRemoved) {
// If any of the files to be removed is a directory, check if the fileHeaderToBeChecked is a sub-file or
// a sub-directory of that directory
if (InternalZipConstants.ZIP_FILE_SEPARATOR.endsWith(fileNameToBeRemoved) &&
if (fileNameToBeRemoved.endsWith(InternalZipConstants.ZIP_FILE_SEPARATOR) &&
fileHeaderToBeChecked.getFileName().startsWith(fileNameToBeRemoved)) {
return true;
} else if (fileHeaderToBeChecked.getFileName().equals(fileNameToBeRemoved)) {
Expand Down

0 comments on commit f31f930

Please sign in to comment.