From 3dd6aa755e017d32e48993b509a6d32de78c930d Mon Sep 17 00:00:00 2001 From: maj00r Date: Sun, 4 Oct 2026 18:08:48 +0200 Subject: [PATCH] Join the user ini path in the tests the way the starter does The tests spelled it with slashes and failed on the Windows runner, where Path.Combine uses backslashes. Also drops a null warning in the drag code. --- StarterNG.Tests/SettingsStoreTests.cs | 3 ++- StarterNG/Views/Depot/ConsistDragging.cs | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/StarterNG.Tests/SettingsStoreTests.cs b/StarterNG.Tests/SettingsStoreTests.cs index ba870a9..f5501e5 100644 --- a/StarterNG.Tests/SettingsStoreTests.cs +++ b/StarterNG.Tests/SettingsStoreTests.cs @@ -5,7 +5,8 @@ namespace StarterNG.Tests; public class SettingsStoreTests { - private const string UserIni = "/home/kolejarz/.config/MaSzyna/eu07.ini"; + // Joined the way SettingsPaths joins it, so it matches on a Windows host too. + private static readonly string UserIni = Path.Combine("/home/kolejarz", ".config", "MaSzyna", "eu07.ini"); private static TestInstallation WithHome(InMemoryFileSystem? files = null) { diff --git a/StarterNG/Views/Depot/ConsistDragging.cs b/StarterNG/Views/Depot/ConsistDragging.cs index 8b6bbc6..04711f2 100644 --- a/StarterNG/Views/Depot/ConsistDragging.cs +++ b/StarterNG/Views/Depot/ConsistDragging.cs @@ -104,9 +104,9 @@ public sealed class ConsistDragging public void MiniPreviewPressed(object? sender, PointerPressedEventArgs e) { - if (_browserSelected() is null || !e.GetCurrentPoint(miniPreviewPanel).Properties.IsLeftButtonPressed) + if (_browserSelected() is not { } texture || !e.GetCurrentPoint(miniPreviewPanel).Properties.IsLeftButtonPressed) return; - ArmVehicleDrag(e, miniPreviewPanel, _browserSelected()); + ArmVehicleDrag(e, miniPreviewPanel, texture); } public void VehicleListPressed(object? sender, PointerPressedEventArgs e)