From aa37b6584225aab65fcfdef6300a262749bbc293 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Fri, 2 Sep 2016 12:26:04 -0700 Subject: [PATCH] Fixed tests for EpisodeFileMovingService --- .../EpisodeFileMovingServiceTests/MoveEpisodeFileFixture.cs | 2 +- src/NzbDrone.Core/MediaFiles/EpisodeFileMovingService.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/NzbDrone.Core.Test/MediaFiles/EpisodeFileMovingServiceTests/MoveEpisodeFileFixture.cs b/src/NzbDrone.Core.Test/MediaFiles/EpisodeFileMovingServiceTests/MoveEpisodeFileFixture.cs index c55518dda..595a19dd4 100644 --- a/src/NzbDrone.Core.Test/MediaFiles/EpisodeFileMovingServiceTests/MoveEpisodeFileFixture.cs +++ b/src/NzbDrone.Core.Test/MediaFiles/EpisodeFileMovingServiceTests/MoveEpisodeFileFixture.cs @@ -53,7 +53,7 @@ public void Setup() .Setup(s => s.BuildSeasonPath(It.IsAny(), It.IsAny())) .Returns(@"C:\Test\TV\Series\Season 01".AsOsAgnostic()); - var rootFolder = @"C:\Test\TV".AsOsAgnostic(); + var rootFolder = @"C:\Test\TV\".AsOsAgnostic(); Mocker.GetMock() .Setup(s => s.FolderExists(rootFolder)) .Returns(true); diff --git a/src/NzbDrone.Core/MediaFiles/EpisodeFileMovingService.cs b/src/NzbDrone.Core/MediaFiles/EpisodeFileMovingService.cs index 44bfcd8ad..774ac202c 100644 --- a/src/NzbDrone.Core/MediaFiles/EpisodeFileMovingService.cs +++ b/src/NzbDrone.Core/MediaFiles/EpisodeFileMovingService.cs @@ -194,7 +194,7 @@ private void CreateFolder(string directoryName) { Ensure.That(directoryName, () => directoryName).IsNotNullOrWhiteSpace(); - var parentFolder = Path.GetDirectoryName(directoryName); + var parentFolder = new OsPath(directoryName).Directory.FullPath; if (!_diskProvider.FolderExists(parentFolder)) { CreateFolder(parentFolder);