Commit 15df48a1 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix import caldav resource

parent bac0a814
Pipeline #95062 passed with stage
in 10 minutes and 8 seconds
......@@ -354,7 +354,7 @@ QStringList AbstractImportExportJob::restoreResourceFile(const QString &resource
QString newUrl = adaptNewResourceUrl(overwriteResources, resourceConfig, storePath);
const QString dataFile = value.akonadiResources;
const KArchiveEntry *dataResouceEntry = mArchiveDirectory->entry(dataFile);
if (dataResouceEntry->isFile()) {
if (dataResouceEntry && dataResouceEntry->isFile()) {
const auto file =
static_cast<const KArchiveFile *>(dataResouceEntry);
if (!file->copyTo(newUrl)) {
......@@ -363,7 +363,9 @@ QStringList AbstractImportExportJob::restoreResourceFile(const QString &resource
<< newUrl;
}
}
settings.insert(QStringLiteral("Path"), newUrl);
if (!newUrl.isEmpty()) {
settings.insert(QStringLiteral("Path"), newUrl);
}
const QString agentConfigFile = value.akonadiAgentConfigFile;
if (!agentConfigFile.isEmpty()) {
......
......@@ -3,5 +3,11 @@ schedule.ics
Path /tmp/backupcalendar//std.ics
0
--------------------------
akonadi_davgroupware_resource
caldav
Path /tmp/backupcalendar//0/
0
--------------------------
akonadi_ical_resource_new_resource_0
akonadi_davgroupware_resource_new_resource_1
--------------------------
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