mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
Added FolderWritable to DiskProvider to centralize the check.
This commit is contained in:
@@ -31,13 +31,7 @@ namespace NzbDrone.Core.HealthCheck.Checks
|
||||
return new HealthCheck(GetType(), HealthCheckResult.Error, "Drone factory folder does not exist");
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
var testPath = Path.Combine(droneFactoryFolder, "drone_test.txt");
|
||||
_diskProvider.WriteAllText(testPath, DateTime.Now.ToString());
|
||||
_diskProvider.DeleteFile(testPath);
|
||||
}
|
||||
catch (Exception)
|
||||
if (!_diskProvider.FolderWritable(droneFactoryFolder))
|
||||
{
|
||||
return new HealthCheck(GetType(), HealthCheckResult.Error, "Unable to write to drone factory folder");
|
||||
}
|
||||
|
Reference in New Issue
Block a user