]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Truncate big value cluster file if its size decreases private/spreadsheet
authorAntti Villberg <antti.villberg@semantum.fi>
Thu, 13 Dec 2018 10:34:03 +0000 (12:34 +0200)
committerJussi Koskela <jussi.koskela@semantum.fi>
Fri, 14 Dec 2018 10:37:59 +0000 (12:37 +0200)
gitlab #232

Change-Id: I62617e6857a150cb27d0d81a53da604577173bfe

bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/ClusterChange.java

index 880bfd00d3e88a225ae10130978cde4f43b5bf76..0b17631341b275059d1241ff3ac28413575527b4 100644 (file)
@@ -493,6 +493,8 @@ public final class ClusterChange {
             left -= written;
             checkBufferSpace(12);
         }
+        // Possibly truncate file
+        modiValue(ri, length_, new byte[0], 0, 0);
         return sum;
     }