diff --git a/source/cdcdb/snapshot.d b/source/cdcdb/snapshot.d index 8cd534e..2b72309 100644 --- a/source/cdcdb/snapshot.d +++ b/source/cdcdb/snapshot.d @@ -38,7 +38,7 @@ private: public: this(DBLite dblite, DBSnapshot dbSnapshot) { _db = dblite; _snapshot = dbSnapshot; } - ubyte[] data() + immutable(ubyte[]) data() { auto chunks = _db.getChunks(_snapshot.id); ubyte[] content; @@ -55,7 +55,7 @@ public: enforce(_snapshot.sha256 == fctx.finish(), "Хеш итогового файла не совпадает"); - return content; + return content.idup; } void data(void delegate(const(ubyte)[]) sink)