mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-27 20:44:00 +02:00
FreeSpaceSpec will return true is free space check returns null
This commit is contained in:
@@ -23,7 +23,7 @@ namespace NzbDrone.Core.MediaFiles.EpisodeImport.Specifications
|
||||
{
|
||||
try
|
||||
{
|
||||
if (_diskProvider.IsParent(localEpisode.Series.Path, localEpisode.Path))
|
||||
if (localEpisode.ExistingFile)
|
||||
{
|
||||
_logger.Trace("Skipping free space check for existing episode");
|
||||
return true;
|
||||
@@ -32,6 +32,12 @@ namespace NzbDrone.Core.MediaFiles.EpisodeImport.Specifications
|
||||
var path = Directory.GetParent(localEpisode.Series.Path);
|
||||
var freeSpace = _diskProvider.GetAvailableSpace(path.FullName);
|
||||
|
||||
if (!freeSpace.HasValue)
|
||||
{
|
||||
_logger.Trace("Free space check returned an invalid result for: {0}", path);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (freeSpace < localEpisode.Size + 100.Megabytes())
|
||||
{
|
||||
_logger.Warn("Not enough free space to import: {0}", localEpisode);
|
||||
|
Reference in New Issue
Block a user