From 18db5ed8a57a0cf5d59d60f6bde0e4272a11d905 Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Sun, 1 Mar 2020 06:02:40 +0000 Subject: [PATCH] Update Remote URI. --- Aaru.Devices/Device/Constructor.cs | 9 +++++++-- Aaru.Devices/Remote/Remote.cs | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Aaru.Devices/Device/Constructor.cs b/Aaru.Devices/Device/Constructor.cs index 4a4a7c7e5..82028afce 100644 --- a/Aaru.Devices/Device/Constructor.cs +++ b/Aaru.Devices/Device/Constructor.cs @@ -68,9 +68,14 @@ namespace Aaru.Devices Error = false; IsRemovable = false; - if(devicePath.StartsWith("dic://")) + if(devicePath.StartsWith("dic://") || + devicePath.StartsWith("aaru://")) { - devicePath = devicePath.Substring(6); + if(devicePath.StartsWith("dic://")) + devicePath = devicePath.Substring(6); + else + devicePath = devicePath.Substring(7); + string[] pieces = devicePath.Split('/'); string host = pieces[0]; devicePath = devicePath.Substring(host.Length); diff --git a/Aaru.Devices/Remote/Remote.cs b/Aaru.Devices/Remote/Remote.cs index 4a894f8d4..f0c178475 100644 --- a/Aaru.Devices/Remote/Remote.cs +++ b/Aaru.Devices/Remote/Remote.cs @@ -324,7 +324,7 @@ namespace Aaru.Devices.Remote for(ushort i = 0; i < response.devices; i++) { DeviceInfo dev = Marshal.ByteArrayToStructureLittleEndian(buf, offset, devInfoLen); - dev.Path = dev.Path[0] == '/' ? $"dic://{_host}{dev.Path}" : $"dic://{_host}/{dev.Path}"; + dev.Path = dev.Path[0] == '/' ? $"aaru://{_host}{dev.Path}" : $"aaru://{_host}/{dev.Path}"; devices.Add(dev); offset += devInfoLen; }