Fixed: Episode import when the series folder had a trailing slash and folder was not on disk

This commit is contained in:
Mark McDowall 2016-08-29 21:22:25 -07:00
parent 77574ec555
commit 422371d118
2 changed files with 2 additions and 1 deletions

View File

@ -58,6 +58,7 @@ namespace NzbDrone.Common.Test
}
[TestCase(@"C:\rooted\windows\path", @"C:\rooted\windows\")]
[TestCase(@"C:\rooted\windows\path\", @"C:\rooted\windows\")]
[TestCase(@"C:\rooted", @"C:\")]
[TestCase(@"C:", null)]
[TestCase("/rooted/linux/path", "/rooted/linux/")]

View File

@ -153,7 +153,7 @@ namespace NzbDrone.Core.MediaFiles
var episodeFolder = Path.GetDirectoryName(filePath);
var seasonFolder = _buildFileNames.BuildSeasonPath(series, seasonNumber);
var seriesFolder = series.Path;
var rootFolder = Path.GetDirectoryName(seriesFolder);
var rootFolder = new OsPath(seriesFolder).Directory.FullPath;
if (!_diskProvider.FolderExists(rootFolder))
{