]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Fixed HistoryUtil.importHistoryArchive to open file in read-only mode 84/4284/1
authorTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Mon, 8 Jun 2020 17:24:14 +0000 (20:24 +0300)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Mon, 8 Jun 2020 17:40:25 +0000 (17:40 +0000)
gitlab #551

Change-Id: Ifc915ecc9d78db492a8cd14b37f31e6c08c9a9ba
(cherry picked from commit 06d9d4c83f447b3b7c4712a4a441871ced1af3ac)

bundles/org.simantics.simulation/src/org/simantics/simulation/history/HistoryUtil.java

index 343adefc8686fc2053b6c4b41e9167d0e937372d..6719cf63b2f138d119b4470403c2b21629a2b6ed 100644 (file)
@@ -664,7 +664,7 @@ public class HistoryUtil {
         */
        public static HistoryImportResult importHistoryArchive(HistoryManager history, Path path) throws IOException, HistoryException {
                HistoryImportResult result = new HistoryImportResult();
-               try (RandomAccessBinary rab = new BinaryFile(path.toFile())) {
+               try (RandomAccessBinary rab = new BinaryFile(path.toFile(), "r")) {
                        importHistoryArchive(history, rab, result);
                        return result;
                } catch (IOException e) {