]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Truncate big value cluster file if its size decreases 48/2548/2
authorAntti Villberg <antti.villberg@semantum.fi>
Thu, 13 Dec 2018 10:34:03 +0000 (12:34 +0200)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Thu, 13 Dec 2018 10:42:19 +0000 (10:42 +0000)
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;
     }