Commit 50124178 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix export alarm

parent af7af592
alarm/akonadi_kalarm_dir_resource_2/agent_config_akonadi_kalarm_dir_resource_2
alarm/akonadi_kalarm_dir_resource_2/akonadi_kalarm_dir_resource_2rc
alarm/akonadi_kalarm_dir_resource_2/alarm.zip
information/VERSION_2
information/exportdatatype.xml
[General]
AlarmTypes=application/x-vnd.kde.alarm.active
DisplayName=Active Alarms
Path[$e]=$[TEST_PATH]/resources/akonadi_kalarm_dir_resource_2/calendar.ics
BEGIN:VCALENDAR
PRODID:-//K Desktop Environment//NONSGML libkcal 4.3//EN
VERSION:2.0
X-KDE-ICAL-IMPLEMENTATION-VERSION:1.0
X-KDE-KALARM-VERSION:2.7.0
END:VCALENDAR
......@@ -46,9 +46,14 @@ void SaveResoureConfigTest::exportResourceToArchive(const QString &archivePath,
break;
}
}
QVERIFY(typeIdentifierFound);
if (QFileInfo(url).isFile()) {
QVERIFY(mArchive->addLocalFile(url, archivePath + resourceArchiveName));
} else {
QVERIFY(mArchive->addLocalFile(url + identifier + QLatin1String(".zip"), archivePath + resourceArchiveName));
}
//qDebug() << "url " << url + identifier + QLatin1String(".zip");
QVERIFY(mArchive->addLocalFile(url + identifier + QLatin1String(".zip"), archivePath + resourceArchiveName));
ResourceConverterTest converter;
const QString errorStr = converter.storeResources(mArchive, identifier, archivePath);
QVERIFY(errorStr.isEmpty());
......@@ -56,5 +61,6 @@ void SaveResoureConfigTest::exportResourceToArchive(const QString &archivePath,
QVERIFY(!urlAgentConfig.isEmpty());
const QFileInfo fi(urlAgentConfig);
const QString filename = fi.fileName();
qDebug() << "urlAgentConfig " << urlAgentConfig;
QVERIFY(mArchive->addLocalFile(urlAgentConfig, archivePath + filename));
}
Markdown is supported
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