1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-05 02:22:31 +01:00

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 @@ public void should_add_directory_slash()
}
[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 @@ private void EnsureEpisodeFolder(EpisodeFile episodeFile, Series series, int sea
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))
{