mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-27 22:56:45 -04:00
DiskSpaceService will not blow up if total or free space is null
This commit is contained in:
@@ -69,14 +69,19 @@ namespace NzbDrone.Core.DiskSpace
|
||||
|
||||
try
|
||||
{
|
||||
var freeSpace = _diskProvider.GetAvailableSpace(path).Value;
|
||||
var totalSpace = _diskProvider.GetTotalSize(path).Value;
|
||||
var freeSpace = _diskProvider.GetAvailableSpace(path);
|
||||
var totalSpace = _diskProvider.GetTotalSize(path);
|
||||
|
||||
if (!freeSpace.HasValue || !totalSpace.HasValue)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
diskSpace = new DiskSpace
|
||||
{
|
||||
Path = path,
|
||||
FreeSpace = freeSpace,
|
||||
TotalSpace = totalSpace
|
||||
FreeSpace = freeSpace.Value,
|
||||
TotalSpace = totalSpace.Value
|
||||
};
|
||||
|
||||
diskSpace.Label = _diskProvider.GetVolumeLabel(path);
|
||||
|
||||
Reference in New Issue
Block a user