mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Create directory before checking for size (#13962)
This commit is contained in:
parent
8ee358de2c
commit
2ea7af777b
@ -72,6 +72,11 @@ 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);
|
||||
}
|
||||
|
||||
var drive = new DriveInfo(path);
|
||||
if (threshold != -1 && drive.AvailableFreeSpace < threshold)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user