mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 02:37:08 -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
|
@ -191,16 +191,16 @@ namespace NzbDrone.Common
|
|||
File.SetAccessControl(filename, fs);
|
||||
}
|
||||
|
||||
public virtual ulong FreeDiskSpace(DirectoryInfo directoryInfo)
|
||||
public virtual ulong FreeDiskSpace(string path)
|
||||
{
|
||||
if(!directoryInfo.Exists)
|
||||
throw new DirectoryNotFoundException(directoryInfo.FullName);
|
||||
if (!FolderExists(path))
|
||||
throw new DirectoryNotFoundException(path);
|
||||
|
||||
ulong freeBytesAvailable;
|
||||
ulong totalNumberOfBytes;
|
||||
ulong totalNumberOfFreeBytes;
|
||||
|
||||
bool success = GetDiskFreeSpaceEx(directoryInfo.FullName, out freeBytesAvailable, out totalNumberOfBytes,
|
||||
bool success = GetDiskFreeSpaceEx(path, out freeBytesAvailable, out totalNumberOfBytes,
|
||||
out totalNumberOfFreeBytes);
|
||||
if (!success)
|
||||
throw new System.ComponentModel.Win32Exception();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue