mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-04-12 12:07:05 +00:00
refactor: Tidying
This commit is contained in:
parent
566884167f
commit
23a068d0c9
2 changed files with 13 additions and 13 deletions
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using ICD.Common.Properties;
|
||||
using ICD.Common.Utils.Extensions;
|
||||
#if SIMPLSHARP
|
||||
using Crestron.SimplSharp.CrestronIO;
|
||||
#else
|
||||
|
|
@ -72,11 +73,11 @@ namespace ICD.Common.Utils.IO
|
|||
public static string GetRelativePath(string folder, string filespec)
|
||||
{
|
||||
Uri pathUri = new Uri(filespec);
|
||||
|
||||
// Folders must end in a slash
|
||||
if (!folder.EndsWith(Path.DirectorySeparatorChar.ToString()))
|
||||
{
|
||||
if (!folder.EndsWith(Path.DirectorySeparatorChar))
|
||||
folder += Path.DirectorySeparatorChar;
|
||||
}
|
||||
|
||||
Uri folderUri = new Uri(folder);
|
||||
return Uri.UnescapeDataString(folderUri.MakeRelativeUri(pathUri).ToString().Replace('/', Path.DirectorySeparatorChar));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
using System;
|
||||
#if SIMPLSHARP
|
||||
#if SIMPLSHARP
|
||||
using Crestron.SimplSharp.CrestronIO;
|
||||
#elif STANDARD
|
||||
using System.IO;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue