mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-02-17 07:33:57 +00:00
fix(sogo-tool): prevent a bug when restoring two events with same id
This commit is contained in:
@@ -419,6 +419,7 @@
|
|||||||
max = [records count];
|
max = [records count];
|
||||||
for (count = 0; count < max; count++)
|
for (count = 0; count < max; count++)
|
||||||
{
|
{
|
||||||
|
version = 0;
|
||||||
if (count > 0 && count%100 == 0)
|
if (count > 0 && count%100 == 0)
|
||||||
{
|
{
|
||||||
DESTROY(pool);
|
DESTROY(pool);
|
||||||
@@ -428,7 +429,7 @@
|
|||||||
cName = [currentRecord objectForKey: @"c_name"];
|
cName = [currentRecord objectForKey: @"c_name"];
|
||||||
if (![existingRecords objectForKey: cName])
|
if (![existingRecords objectForKey: cName])
|
||||||
{
|
{
|
||||||
NSLog (@"restoring record '%@'", cName);
|
NSLog (@"restoring record '%@' with version %d", cName, version);
|
||||||
cContent = [currentRecord objectForKey: @"c_content"];
|
cContent = [currentRecord objectForKey: @"c_content"];
|
||||||
[gcsFolder writeContent: cContent
|
[gcsFolder writeContent: cContent
|
||||||
fromComponent: [[self parsingClassForContent: cContent] parseSingleFromSource: cContent]
|
fromComponent: [[self parsingClassForContent: cContent] parseSingleFromSource: cContent]
|
||||||
|
|||||||
Reference in New Issue
Block a user