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

Don't store empty url

parent 28156bb3
...@@ -69,8 +69,8 @@ void ExportAddressbookJobInterfaceImpl::slotWriteNextArchiveResource() ...@@ -69,8 +69,8 @@ void ExportAddressbookJobInterfaceImpl::slotWriteNextArchiveResource()
ResourceConverterImpl converter; ResourceConverterImpl converter;
const QString url = converter.resourcePath(identifier, QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QStringLiteral("/contacts/")); const QString url = converter.resourcePath(identifier, QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QStringLiteral("/contacts/"));
if (!mAgentPaths.contains(url)) { if (!mAgentPaths.contains(url)) {
mAgentPaths << url;
if (!url.isEmpty()) { if (!url.isEmpty()) {
mAgentPaths << url;
ExportResourceArchiveJob *resourceJob = new ExportResourceArchiveJob(this); ExportResourceArchiveJob *resourceJob = new ExportResourceArchiveJob(this);
resourceJob->setArchivePath(archivePath); resourceJob->setArchivePath(archivePath);
resourceJob->setUrl(url); resourceJob->setUrl(url);
......
...@@ -66,8 +66,8 @@ void ExportAlarmJobInterfaceImpl::slotWriteNextArchiveResource() ...@@ -66,8 +66,8 @@ void ExportAlarmJobInterfaceImpl::slotWriteNextArchiveResource()
ResourceConverterImpl converter; ResourceConverterImpl converter;
const QString url = converter.resourcePath(identifier); const QString url = converter.resourcePath(identifier);
if (!mAgentPaths.contains(url)) { if (!mAgentPaths.contains(url)) {
mAgentPaths << url;
if (!url.isEmpty()) { if (!url.isEmpty()) {
mAgentPaths << url;
ExportResourceArchiveJob *resourceJob = new ExportResourceArchiveJob(this); ExportResourceArchiveJob *resourceJob = new ExportResourceArchiveJob(this);
resourceJob->setArchivePath(archivePath); resourceJob->setArchivePath(archivePath);
resourceJob->setUrl(url); resourceJob->setUrl(url);
......
...@@ -84,8 +84,8 @@ void ExportCalendarJobInterfaceImpl::slotWriteNextArchiveResource() ...@@ -84,8 +84,8 @@ void ExportCalendarJobInterfaceImpl::slotWriteNextArchiveResource()
ResourceConverterImpl converter; ResourceConverterImpl converter;
const QString url = converter.resourcePath(identifier); const QString url = converter.resourcePath(identifier);
if (!mAgentPaths.contains(url)) { if (!mAgentPaths.contains(url)) {
mAgentPaths << url;
if (!url.isEmpty()) { if (!url.isEmpty()) {
mAgentPaths << url;
ExportResourceArchiveJob *resourceJob = new ExportResourceArchiveJob(this); ExportResourceArchiveJob *resourceJob = new ExportResourceArchiveJob(this);
resourceJob->setArchivePath(archivePath); resourceJob->setArchivePath(archivePath);
resourceJob->setUrl(url); resourceJob->setUrl(url);
......
...@@ -89,8 +89,8 @@ void ExportMailJobInterfaceImpl::slotWriteNextArchiveResource() ...@@ -89,8 +89,8 @@ void ExportMailJobInterfaceImpl::slotWriteNextArchiveResource()
ResourceConverterImpl converter; ResourceConverterImpl converter;
const QString url = converter.resourcePath(identifier); const QString url = converter.resourcePath(identifier);
if (!mAgentPaths.contains(url)) { if (!mAgentPaths.contains(url)) {
mAgentPaths << url;
if (!url.isEmpty()) { if (!url.isEmpty()) {
mAgentPaths << url;
ExportResourceArchiveJob *resourceJob = new ExportResourceArchiveJob(this); ExportResourceArchiveJob *resourceJob = new ExportResourceArchiveJob(this);
resourceJob->setArchivePath(archivePath); resourceJob->setArchivePath(archivePath);
resourceJob->setUrl(url); resourceJob->setUrl(url);
......
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