mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 21:43:33 -07:00
fixed some tests, cleaned up root folders.
This commit is contained in:
parent
e44d262a1a
commit
a0d0e4715e
18 changed files with 110 additions and 133 deletions
|
@ -38,8 +38,11 @@ namespace NzbDrone.Core.RootFolders
|
|||
|
||||
rootFolders.ForEach(folder =>
|
||||
{
|
||||
folder.FreeSpace = _diskProvider.FreeDiskSpace(new DirectoryInfo(folder.Path));
|
||||
folder.UnmappedFolders = GetUnmappedFolders(folder.Path);
|
||||
if (_diskProvider.FolderExists(folder.Path))
|
||||
{
|
||||
folder.FreeSpace = _diskProvider.FreeDiskSpace(folder.Path);
|
||||
folder.UnmappedFolders = GetUnmappedFolders(folder.Path);
|
||||
}
|
||||
});
|
||||
|
||||
return rootFolders;
|
||||
|
@ -58,7 +61,7 @@ namespace NzbDrone.Core.RootFolders
|
|||
|
||||
_rootFolderRepository.Add(rootFolder);
|
||||
|
||||
rootFolder.FreeSpace = _diskProvider.FreeDiskSpace(new DirectoryInfo(rootFolder.Path));
|
||||
rootFolder.FreeSpace = _diskProvider.FreeDiskSpace(rootFolder.Path);
|
||||
rootFolder.UnmappedFolders = GetUnmappedFolders(rootFolder.Path);
|
||||
return rootFolder;
|
||||
}
|
||||
|
@ -108,7 +111,7 @@ namespace NzbDrone.Core.RootFolders
|
|||
{
|
||||
try
|
||||
{
|
||||
freeSpace.Add(pathRoot, _diskProvider.FreeDiskSpace(new DirectoryInfo(rootDir.Path)));
|
||||
freeSpace.Add(pathRoot, _diskProvider.FreeDiskSpace(rootDir.Path));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue