From ca4416c41946ce1a561e9a9ec1ba2f75205af902 Mon Sep 17 00:00:00 2001 From: Tuukka Lehtonen Date: Mon, 8 Jun 2020 20:24:14 +0300 Subject: [PATCH] Fixed HistoryUtil.importHistoryArchive to open file in read-only mode gitlab #551 Change-Id: Ifc915ecc9d78db492a8cd14b37f31e6c08c9a9ba (cherry picked from commit 06d9d4c83f447b3b7c4712a4a441871ced1af3ac) --- .../src/org/simantics/simulation/history/HistoryUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { -- 2.43.2