From b41c613347e2ea98dc4d92df4bcf1f406664aca8 Mon Sep 17 00:00:00 2001 From: Carl Johnsen Date: Wed, 18 Mar 2026 07:03:52 +0100 Subject: [PATCH] Paths handled by the disk image feature doesn't treat all separators as / --- Duplicati/UnitTest/DiskImage/DiskImageUnitTests.cs | 2 +- proprietary/DiskImage/RestoreProvider.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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); }