From 7039731e6700291acfb72dc52c4e6400bc82fa69 Mon Sep 17 00:00:00 2001 From: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com> Date: Sun, 26 Oct 2025 23:04:30 -0700 Subject: [PATCH] Fix exception sometimes thrown on save - Switch back from File.Rename to File.Move, as Rename is throwing exceptions on some users systems --- Libraries/SPTarkov.Server.Core/Utils/FileUtil.cs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/Libraries/SPTarkov.Server.Core/Utils/FileUtil.cs b/Libraries/SPTarkov.Server.Core/Utils/FileUtil.cs index bd317b95..2fe0d3cf 100644 --- a/Libraries/SPTarkov.Server.Core/Utils/FileUtil.cs +++ b/Libraries/SPTarkov.Server.Core/Utils/FileUtil.cs @@ -135,14 +135,7 @@ public class FileUtil } // Overwrite over the old file - if (File.Exists(filePath)) - { - File.Replace(tempFilePath, filePath, null); - } - else - { - File.Move(tempFilePath, filePath); - } + File.Move(tempFilePath, filePath, overwrite: true); } catch {