Commit 926d000d authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

make sure to synchronize resources

parent 7c3a5d87
Pipeline #168632 failed with stage
in 1 minute and 29 seconds
......@@ -43,6 +43,10 @@ TargetCollection 3788
UseTLS true
synchronizeTree: false
--------------------------
akonadi_imap_resource_new_resource_3
akonadi_kolab_resource_new_resource_4
akonadi_pop3_resource_new_resource_5
--------------------------
Special Collection : 3 colId 3734
--------------------------
Special Collection : 5 colId 3730
......
......@@ -23,3 +23,7 @@ TargetCollection 3788
UseTLS true
synchronizeTree: false
--------------------------
akonadi_imap_resource_new_resource_0
akonadi_kolab_resource_new_resource_1
akonadi_pop3_resource_new_resource_2
--------------------------
......@@ -199,6 +199,7 @@ void ImportMailJobInterface::restoreResources()
QDir dir(mTempDirName);
dir.mkdir(Utils::resourcesPath());
ResourceConverterImpl converter;
QStringList listResourceToSync;
for (const QString &filename : std::as_const(mFileList)) {
// We need to find akonadi_* and agent_config_akonadi_*
if (filename.startsWith(Utils::resourcesPath() + QStringLiteral("akonadi_"))) {
......@@ -304,6 +305,7 @@ void ImportMailJobInterface::restoreResources()
if (!newResource.isEmpty()) {
mHashResources.insert(filename, newResource);
infoAboutNewResource(newResource);
listResourceToSync << newResource;
}
} else if (filename.contains(QLatin1String("imap")) || filename.contains(QLatin1String("kolab_"))
|| filename.contains(QLatin1String("gmail_"))) {
......@@ -408,6 +410,7 @@ void ImportMailJobInterface::restoreResources()
if (!newResource.isEmpty()) {
mHashResources.insert(filename, newResource);
infoAboutNewResource(newResource);
listResourceToSync << newResource;
}
} else {
qCWarning(PIMDATAEXPORTERCORE_LOG) << " problem with resource: " << filename;
......@@ -415,10 +418,8 @@ void ImportMailJobInterface::restoreResources()
}
}
}
// TODO synctree ?
Q_EMIT info(i18n("Resources restored."));
QTimer::singleShot(0, this, &ImportMailJobInterface::slotNextStep);
synchronizeResource(listResourceToSync);
}
void ImportMailJobInterface::restoreMails()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment