From c67c99d11fc012404f2fbd8fa3b27fac675ce9f2 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Fri, 9 Dec 2016 16:40:08 +0100 Subject: Add comment regarding the blob copying hack. --- common/domain/applicationdomaintype.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/domain/applicationdomaintype.cpp b/common/domain/applicationdomaintype.cpp index f00f3ed..42ae11a 100644 --- a/common/domain/applicationdomaintype.cpp +++ b/common/domain/applicationdomaintype.cpp @@ -50,6 +50,8 @@ void copyBuffer(Sink::ApplicationDomain::BufferAdaptor &buffer, Sink::Applicatio const auto value = buffer.getProperty(property); if (copyBlobs && value.canConvert()) { auto oldPath = value.value().value; + //FIXME: This is neither pretty nor save if we have multiple modifications of the same property (the first modification will remove the file). + //At least if the modification fails the file will be removed once the entity is removed. auto newPath = oldPath + "copy"; QFile::copy(oldPath, newPath); memoryAdaptor.setProperty(property, QVariant::fromValue(BLOB{newPath})); -- cgit v1.2.3