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.
This commit is contained in:
maj00r
2026-10-04 18:08:48 +02:00
parent 72b4e44c43
commit 3dd6aa755e
2 changed files with 4 additions and 3 deletions

View File

@@ -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)
{

View File

@@ -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)