diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-12-09 16:40:08 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-12-09 16:40:08 +0100 |
commit | c67c99d11fc012404f2fbd8fa3b27fac675ce9f2 (patch) | |
tree | 768ac59d7da7a8aa366f7d709d7e82a9416d34b4 /common/domain/applicationdomaintype.cpp | |
parent | 9f6751df8e6f483b112c2b24c0bc725924f17356 (diff) | |
download | sink-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.cpp | 2 |
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})); |