]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.simulation/src/org/simantics/simulation/history/HistoryUtil.java
Fixed HistoryUtil.importHistoryArchive to open file in read-only mode
[simantics/platform.git] / 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) {