diff --git a/Duplicati/UnitTest/DiskImage/DiskImageUnitTests.cs b/Duplicati/UnitTest/DiskImage/DiskImageUnitTests.cs index f15699caf..c975d56e9 100644 --- a/Duplicati/UnitTest/DiskImage/DiskImageUnitTests.cs +++ b/Duplicati/UnitTest/DiskImage/DiskImageUnitTests.cs @@ -3769,7 +3769,7 @@ public class DiskImageUnitTests : BasicSetupHelper // Test with geometry file at the root of the device // Use the actual device path from the GPT test disk - var geometryPath = $"{s_gptRawDisk!.DevicePath}/geometry.json"; + var geometryPath = $"{s_gptRawDisk!.DevicePath}{Path.DirectorySeparatorChar}geometry.json"; var result = parsePathMethod!.Invoke(provider, [geometryPath]); Assert.IsNotNull(result, "Should return a tuple."); diff --git a/proprietary/DiskImage/RestoreProvider.cs b/proprietary/DiskImage/RestoreProvider.cs index 9543b032a..3cae0726b 100644 --- a/proprietary/DiskImage/RestoreProvider.cs +++ b/proprietary/DiskImage/RestoreProvider.cs @@ -588,7 +588,7 @@ public sealed class RestoreProvider : IRestoreDestinationProviderModule, IDispos string geometryDevicePath = NormalizePath(_targetDisk.DevicePath); - string expectedGeometryPath = $"{geometryDevicePath}/geometry.json"; + string expectedGeometryPath = $"{geometryDevicePath}{Path.DirectorySeparatorChar}geometry.json"; return string.Equals(path, expectedGeometryPath, StringComparison.OrdinalIgnoreCase); }