Skip to content

Commit

Permalink
0005177: File Sync fails to create zip file when modify, followed by
Browse files Browse the repository at this point in the history
delete, followed by create is captured and sent in same batch
  • Loading branch information
Philip Marzullo committed Dec 29, 2021
1 parent fc9ecd2 commit 56a6169
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -209,8 +209,11 @@ public void end(Batch batch, boolean inError) {
LastEventType previousEventForEntry = entriesByLastEventType.get(entryName.toString());
boolean addFileToZip = true;
if (previousEventForEntry != null) {
// There could be a delete between a MODIFY and a CREATE, but the delete is not added to the
// entriesByLastEventType data structure
if ((previousEventForEntry == eventType)
|| (previousEventForEntry == LastEventType.CREATE && eventType == LastEventType.MODIFY)) {
|| (previousEventForEntry == LastEventType.CREATE && eventType == LastEventType.MODIFY)
|| (previousEventForEntry == LastEventType.MODIFY && eventType == LastEventType.CREATE)) {
addFileToZip = false;
}
}
Expand Down

0 comments on commit 56a6169

Please sign in to comment.