From: Tuukka Lehtonen Date: Mon, 8 Jun 2020 17:24:14 +0000 (+0300) Subject: Fixed HistoryUtil.importHistoryArchive to open file in read-only mode X-Git-Tag: v1.43.0~15 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F00%2F4300%2F1;p=simantics%2Fplatform.git Fixed HistoryUtil.importHistoryArchive to open file in read-only mode gitlab #551 Change-Id: Ifc915ecc9d78db492a8cd14b37f31e6c08c9a9ba --- diff --git a/bundles/org.simantics.simulation/src/org/simantics/simulation/history/HistoryUtil.java b/bundles/org.simantics.simulation/src/org/simantics/simulation/history/HistoryUtil.java index 343adefc8..6719cf63b 100644 --- a/bundles/org.simantics.simulation/src/org/simantics/simulation/history/HistoryUtil.java +++ b/bundles/org.simantics.simulation/src/org/simantics/simulation/history/HistoryUtil.java @@ -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) {