Просмотр исходного кода

Only remove keyframe cache dir if it exists (#13834)

Tim Eisele 2 месяцев назад
Родитель
Сommit
0bde7bae05
1 измененных файлов с 4 добавлено и 1 удалено
  1. 4 1
      Jellyfin.Server/Migrations/Routines/MigrateKeyframeData.cs

+ 4 - 1
Jellyfin.Server/Migrations/Routines/MigrateKeyframeData.cs

@@ -110,7 +110,10 @@ public class MigrateKeyframeData : IDatabaseMigrationRoutine
 
         _logger.LogInformation("Imported keyframes for {Count} items in {Time}", itemCount, sw.Elapsed);
 
-        Directory.Delete(KeyframeCachePath, true);
+        if (Directory.Exists(KeyframeCachePath))
+        {
+            Directory.Delete(KeyframeCachePath, true);
+        }
     }
 
     private bool TryGetKeyframeData(BaseItem item, [NotNullWhen(true)] out KeyframeData? data)