summaryrefslogtreecommitdiffstats
path: root/common/domain/applicationdomaintype.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2016-12-09 16:40:08 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2016-12-09 16:40:08 +0100
commitc67c99d11fc012404f2fbd8fa3b27fac675ce9f2 (patch)
tree768ac59d7da7a8aa366f7d709d7e82a9416d34b4 /common/domain/applicationdomaintype.cpp
parent9f6751df8e6f483b112c2b24c0bc725924f17356 (diff)
downloadsink-c67c99d11fc012404f2fbd8fa3b27fac675ce9f2.tar.gz
sink-c67c99d11fc012404f2fbd8fa3b27fac675ce9f2.zip
Add comment regarding the blob copying hack.
Diffstat (limited to 'common/domain/applicationdomaintype.cpp')
-rw-r--r--common/domain/applicationdomaintype.cpp2
1 files changed, 2 insertions, 0 deletions
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
50 const auto value = buffer.getProperty(property); 50 const auto value = buffer.getProperty(property);
51 if (copyBlobs && value.canConvert<BLOB>()) { 51 if (copyBlobs && value.canConvert<BLOB>()) {
52 auto oldPath = value.value<BLOB>().value; 52 auto oldPath = value.value<BLOB>().value;
53 //FIXME: This is neither pretty nor save if we have multiple modifications of the same property (the first modification will remove the file).
54 //At least if the modification fails the file will be removed once the entity is removed.
53 auto newPath = oldPath + "copy"; 55 auto newPath = oldPath + "copy";
54 QFile::copy(oldPath, newPath); 56 QFile::copy(oldPath, newPath);
55 memoryAdaptor.setProperty(property, QVariant::fromValue(BLOB{newPath})); 57 memoryAdaptor.setProperty(property, QVariant::fromValue(BLOB{newPath}));