Fixed: Not properly getting the parent of a folder with a trailing slash

GetParentFolder will trim trailing slashes
This commit is contained in:
Mark McDowall
2015-02-13 16:52:42 -08:00
parent 1b3993bf6a
commit 3ed8f0ea84
2 changed files with 10 additions and 1 deletions
+1 -1
View File
@@ -355,7 +355,7 @@ namespace NzbDrone.Common.Disk
{
Ensure.That(path, () => path).IsValidPath();
var parent = Directory.GetParent(path);
var parent = Directory.GetParent(path.TrimEnd(Path.DirectorySeparatorChar));
if (parent == null)
{