Skip to content

Commit

Permalink
fix(sogo-tool): prevent a bug when restoring two events with same id
Browse files Browse the repository at this point in the history
  • Loading branch information
QHivert committed Sep 11, 2024
1 parent 68f4fc1 commit 84fe91c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Tools/SOGoToolRestore.m
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,7 @@ - (BOOL) restoreRecords: (NSArray *) records
max = [records count];
for (count = 0; count < max; count++)
{
version = 0;
if (count > 0 && count%100 == 0)
{
DESTROY(pool);
Expand All @@ -428,7 +429,7 @@ - (BOOL) restoreRecords: (NSArray *) records
cName = [currentRecord objectForKey: @"c_name"];
if (![existingRecords objectForKey: cName])
{
NSLog (@"restoring record '%@'", cName);
NSLog (@"restoring record '%@' with version %d", cName, version);
cContent = [currentRecord objectForKey: @"c_content"];
[gcsFolder writeContent: cContent
fromComponent: [[self parsingClassForContent: cContent] parseSingleFromSource: cContent]
Expand Down

0 comments on commit 84fe91c

Please sign in to comment.