From a9e1aee295029d2f71005574230eec83c916eca3 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Sun, 22 Oct 2017 10:03:02 -0700 Subject: [PATCH] Moved NotParentException to Disk namespace --- .../{Exceptions => Disk}/NotParentException.cs | 4 +++- src/NzbDrone.Common/Extensions/PathExtensions.cs | 4 ++-- src/NzbDrone.Common/NzbDrone.Common.csproj | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) rename src/NzbDrone.Common/{Exceptions => Disk}/NotParentException.cs (79%) diff --git a/src/NzbDrone.Common/Exceptions/NotParentException.cs b/src/NzbDrone.Common/Disk/NotParentException.cs similarity index 79% rename from src/NzbDrone.Common/Exceptions/NotParentException.cs rename to src/NzbDrone.Common/Disk/NotParentException.cs index d9b78247e..0ae384722 100644 --- a/src/NzbDrone.Common/Exceptions/NotParentException.cs +++ b/src/NzbDrone.Common/Disk/NotParentException.cs @@ -1,4 +1,6 @@ -namespace NzbDrone.Common.Exceptions +using NzbDrone.Common.Exceptions; + +namespace NzbDrone.Common.Disk { public class NotParentException : NzbDroneException { diff --git a/src/NzbDrone.Common/Extensions/PathExtensions.cs b/src/NzbDrone.Common/Extensions/PathExtensions.cs index 7576d454a..14da5fd51 100644 --- a/src/NzbDrone.Common/Extensions/PathExtensions.cs +++ b/src/NzbDrone.Common/Extensions/PathExtensions.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using System.Text.RegularExpressions; @@ -59,7 +59,7 @@ public static string GetRelativePath(this string parentPath, string childPath) { if (!parentPath.IsParentPath(childPath)) { - throw new Exceptions.NotParentException("{0} is not a child of {1}", childPath, parentPath); + throw new NotParentException("{0} is not a child of {1}", childPath, parentPath); } return childPath.Substring(parentPath.Length).Trim(Path.DirectorySeparatorChar); diff --git a/src/NzbDrone.Common/NzbDrone.Common.csproj b/src/NzbDrone.Common/NzbDrone.Common.csproj index 83ec8fb24..deabfd536 100644 --- a/src/NzbDrone.Common/NzbDrone.Common.csproj +++ b/src/NzbDrone.Common/NzbDrone.Common.csproj @@ -126,7 +126,7 @@ - +