Skip to content

Commit

Permalink
Change when an existing entry exists we add it to
Browse files Browse the repository at this point in the history
the converted entry
  • Loading branch information
Bob-IT authored and gjanssens committed Mar 13, 2016
1 parent f8090fa commit 427d62e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/engine/Account.c
Expand Up @@ -5829,17 +5829,15 @@ change_imap_entry (Account *root, gpointer user_data)
// check for existing guid entry
if (qof_instance_has_slot (QOF_INSTANCE(imapInfo->source_account), kvp_path))
{
int64_t existing_count = 1;
int64_t existing_count = 0;

// get the count value
qof_instance_get_kvp (QOF_INSTANCE (imapInfo->source_account), kvp_path, &value);

if (G_VALUE_HOLDS_INT64 (&value))
existing_count = g_value_get_int64 (&value);

// if existing_count is greater, use that one
if (existing_count > count)
count = existing_count;
count = count + existing_count;
}
g_value_set_int64 (&value, count);

Expand Down

0 comments on commit 427d62e

Please sign in to comment.