Fixed: Error when importing files and old folder doesn’t exist.

Fixes #2485
This commit is contained in:
Leonardo Galli 2018-02-07 11:08:05 +01:00
parent e71e518d30
commit 11211dc2ed
1 changed files with 1 additions and 1 deletions

View File

@ -141,7 +141,7 @@ namespace NzbDrone.Core.MediaFiles
_mediaFileAttributeService.SetFilePermissions(destinationFilePath);
if(oldMoviePath != newMoviePath)
if(oldMoviePath != newMoviePath && _diskProvider.FolderExists(oldMoviePath))
{
//Let's move the old files before deleting the old folder. We could just do move folder, but the main file (movie file) is already moved, so eh.
var files = _diskProvider.GetFiles(oldMoviePath, SearchOption.AllDirectories);