diff options
| author | JPVenson <github@jpb.email> | 2025-04-26 18:30:57 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-26 09:30:57 -0600 |
| commit | 2ea7af777b99b52d2291495596defa97408fe6d0 (patch) | |
| tree | eebdaee6d31a1dbb7fc2f53b26a82d2a273b43af /Jellyfin.Server.Implementations | |
| parent | 8ee358de2ca956d22c14f28c3783ba99acd87a32 (diff) | |
Create directory before checking for size (#13962)
Diffstat (limited to 'Jellyfin.Server.Implementations')
| -rw-r--r-- | Jellyfin.Server.Implementations/StorageHelpers/StorageHelper.cs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Jellyfin.Server.Implementations/StorageHelpers/StorageHelper.cs b/Jellyfin.Server.Implementations/StorageHelpers/StorageHelper.cs index 635644179..e351160c1 100644 --- a/Jellyfin.Server.Implementations/StorageHelpers/StorageHelper.cs +++ b/Jellyfin.Server.Implementations/StorageHelpers/StorageHelper.cs @@ -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) { |
