Cleanup file related code (#14023)

This commit is contained in:
Bond-009
2025-05-04 16:40:34 +02:00
committed by GitHub
parent 4096c973c6
commit 0c3ba30de2
17 changed files with 104 additions and 56 deletions
@@ -72,10 +72,7 @@ public static class StorageHelper
private static void TestDataDirectorySize(string path, ILogger logger, long threshold = -1)
{
logger.LogDebug("Check path {TestPath} for storage capacity", path);
if (!Directory.Exists(path))
{
Directory.CreateDirectory(path);
}
Directory.CreateDirectory(path);
var drive = new DriveInfo(path);
if (threshold != -1 && drive.AvailableFreeSpace < threshold)