summaryrefslogtreecommitdiffstats
path: root/common/pipeline.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2016-06-13 09:11:37 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2016-06-13 09:11:37 +0200
commit1e2e4437094d80f1cdd849c7341019910fc29fb1 (patch)
tree5f75e3dab8da864eab8a51c06be205a24e185dcb /common/pipeline.cpp
parent3fa1766af3fa85067d4b2d48c8410e6c201ae323 (diff)
downloadsink-1e2e4437094d80f1cdd849c7341019910fc29fb1.tar.gz
sink-1e2e4437094d80f1cdd849c7341019910fc29fb1.zip
Get folder moves to work, and fix the mime message moving.
Diffstat (limited to 'common/pipeline.cpp')
-rw-r--r--common/pipeline.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/common/pipeline.cpp b/common/pipeline.cpp
index 2c08aa0..5d8a34c 100644
--- a/common/pipeline.cpp
+++ b/common/pipeline.cpp
@@ -221,8 +221,6 @@ KAsync::Job<qint64> Pipeline::modifiedEntity(void const *command, size_t size)
221 Trace() << "Pipeline: Modified Entity"; 221 Trace() << "Pipeline: Modified Entity";
222 d->transactionItemCount++; 222 d->transactionItemCount++;
223 223
224 const qint64 newRevision = Storage::maxRevision(d->transaction) + 1;
225
226 { 224 {
227 flatbuffers::Verifier verifyer(reinterpret_cast<const uint8_t *>(command), size); 225 flatbuffers::Verifier verifyer(reinterpret_cast<const uint8_t *>(command), size);
228 if (!Commands::VerifyModifyEntityBuffer(verifyer)) { 226 if (!Commands::VerifyModifyEntityBuffer(verifyer)) {
@@ -305,13 +303,18 @@ KAsync::Job<qint64> Pipeline::modifiedEntity(void const *command, size_t size)
305 } 303 }
306 304
307 for (auto processor : d->processors[bufferType]) { 305 for (auto processor : d->processors[bufferType]) {
308 processor->modifiedEntity(key, newRevision, *current, *newAdaptor, d->transaction); 306 processor->resourceType = d->resourceType;
307 processor->pipeline = this;
308 processor->modifiedEntity(key, Storage::maxRevision(d->transaction) + 1, *current, *newAdaptor, d->transaction);
309 } 309 }
310 //The maxRevision may have changed meanwhile if the entity created sub-entities
311 const qint64 newRevision = Storage::maxRevision(d->transaction) + 1;
310 312
311 // Add metadata buffer 313 // Add metadata buffer
312 flatbuffers::FlatBufferBuilder metadataFbb; 314 flatbuffers::FlatBufferBuilder metadataFbb;
313 { 315 {
314 auto modifiedProperties = BufferUtils::toVector(metadataFbb, changeset); 316 //We add availableProperties to account for the properties that have been changed by the preprocessors
317 auto modifiedProperties = BufferUtils::toVector(metadataFbb, changeset + newAdaptor->availableProperties());
315 auto metadataBuilder = MetadataBuilder(metadataFbb); 318 auto metadataBuilder = MetadataBuilder(metadataFbb);
316 metadataBuilder.add_revision(newRevision); 319 metadataBuilder.add_revision(newRevision);
317 metadataBuilder.add_operation(Operation_Modification); 320 metadataBuilder.add_operation(Operation_Modification);