diff options
author | Christian Mollekopf <mollekopf@kolabsystems.com> | 2017-10-09 16:10:12 +0200 |
---|---|---|
committer | Christian Mollekopf <mollekopf@kolabsystems.com> | 2017-10-09 16:48:29 +0200 |
commit | 961b3c5775a805eae02718884cfa9dedc8188897 (patch) | |
tree | 8a2f69b2f121c5202c604d42621a4beb83866546 /common/pipeline.cpp | |
parent | 3f7fb279c7ad7bf6e70a4839c64c9cf5633301c4 (diff) | |
download | sink-961b3c5775a805eae02718884cfa9dedc8188897.tar.gz sink-961b3c5775a805eae02718884cfa9dedc8188897.zip |
Ensure we copy all blobs when copying to another resource
Diffstat (limited to 'common/pipeline.cpp')
-rw-r--r-- | common/pipeline.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/common/pipeline.cpp b/common/pipeline.cpp index f29c7db..0cdedee 100644 --- a/common/pipeline.cpp +++ b/common/pipeline.cpp | |||
@@ -295,9 +295,11 @@ KAsync::Job<qint64> Pipeline::modifiedEntity(void const *command, size_t size) | |||
295 | 295 | ||
296 | //The entity is either being copied or moved | 296 | //The entity is either being copied or moved |
297 | if (newEntity.resourceInstanceIdentifier() != d->resourceContext.resourceInstanceIdentifier) { | 297 | if (newEntity.resourceInstanceIdentifier() != d->resourceContext.resourceInstanceIdentifier) { |
298 | SinkTraceCtx(d->logCtx) << "Moving entity to new resource " << newEntity.identifier() << newEntity.resourceInstanceIdentifier(); | 298 | auto copy = *ApplicationDomain::ApplicationDomainType::getInMemoryCopy<ApplicationDomain::ApplicationDomainType>(newEntity, newEntity.availableProperties()); |
299 | newEntity.setChangedProperties(newEntity.availableProperties().toSet()); | 299 | copy.setResource(newEntity.resourceInstanceIdentifier()); |
300 | return create(bufferType, newEntity) | 300 | copy.setChangedProperties(copy.availableProperties().toSet()); |
301 | SinkTraceCtx(d->logCtx) << "Moving entity to new resource " << copy.identifier() << copy.resourceInstanceIdentifier(); | ||
302 | return create(bufferType, copy) | ||
301 | .then([=](const KAsync::Error &error) { | 303 | .then([=](const KAsync::Error &error) { |
302 | if (!error) { | 304 | if (!error) { |
303 | SinkTraceCtx(d->logCtx) << "Move of " << current.identifier() << "was successfull"; | 305 | SinkTraceCtx(d->logCtx) << "Move of " << current.identifier() << "was successfull"; |