Commit 2a96d191 authored by Sebastian Trueg's avatar Sebastian Trueg
Browse files

Ignore existing resources without any information to be added.

If a resource exists and we do not have any data to add we simply
ignore it. This fixes file indexing if the parent folder resource
already exists.

BUG: 287469
parent 3b328c34
......@@ -1523,10 +1523,10 @@ QHash<QUrl, QUrl> Nepomuk::DataManagementModel::storeResources(const Nepomuk::Si
if( QFileInfo( nieUrl.toLocalFile() ).isDir() )
newRes.insert( RDF::type(), NFO::Folder() );
}
}
newRes.setUri( resolvedUri );
syncResources << newRes;
newRes.setUri( resolvedUri );
syncResources << newRes;
}
resolvedNodes.insert( nieUrl, resolvedUri );
it.setValue( convertIfBlankUri(resolvedUri) );
......@@ -1610,7 +1610,7 @@ QHash<QUrl, QUrl> Nepomuk::DataManagementModel::storeResources(const Nepomuk::Si
allStatements << stList;
if(stList.isEmpty()) {
setError(d->m_classAndPropertyTree->lastError());
setError(QString::fromLatin1("storeResources: Encountered empty sync resource (%1). This is a bug. Please report.").arg(syncRes.uri().url()));
return QHash<QUrl, QUrl>();
}
......
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