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

pull/6/head
Mark McDowall 8 years ago
parent 77574ec555
commit 422371d118

@ -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/")]

@ -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))
{

Loading…
Cancel
Save