Explorar o código

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

Tim Eisele hai 2 meses
pai
achega
0bde7bae05
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  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)