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-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=commitdiff_plain;h=ca4416c41946ce1a561e9a9ec1ba2f75205af902 Fixed HistoryUtil.importHistoryArchive to open file in read-only mode gitlab #551 Change-Id: Ifc915ecc9d78db492a8cd14b37f31e6c08c9a9ba (cherry picked from commit 06d9d4c83f447b3b7c4712a4a441871ced1af3ac) --- 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) {