From 6e45e2557f66f055a5558d2fe055d844fc849177 Mon Sep 17 00:00:00 2001 From: IhateTrains Date: Thu, 4 Jan 2024 13:58:45 +0100 Subject: [PATCH] Fix the converter not being able to read saves used by another process (#1686) #patch --- ImperatorToCK3/Imperator/World.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ImperatorToCK3/Imperator/World.cs b/ImperatorToCK3/Imperator/World.cs index f92c347fa..f3d86c6b8 100644 --- a/ImperatorToCK3/Imperator/World.cs +++ b/ImperatorToCK3/Imperator/World.cs @@ -408,11 +408,11 @@ private void VerifySave(string saveGamePath) { } } private static BufferedReader ProcessDebugModeSave(string saveGamePath) { - return new BufferedReader(File.Open(saveGamePath, FileMode.Open)); + return new BufferedReader(File.Open(saveGamePath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite)); } private static BufferedReader ProcessCompressedEncodedSave(string saveGamePath) { Helpers.RakalyCaller.MeltSave(saveGamePath); - return new BufferedReader(File.Open("temp/melted_save.rome", FileMode.Open)); + return new BufferedReader(File.Open("temp/melted_save.rome", FileMode.Open, FileAccess.Read, FileShare.ReadWrite)); } private readonly IgnoredKeywordsSet ignoredTokens = new();