Skip to content

The Free Software Media System - Server Backend & API

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

Tim Eisele0bde7bae05de
diff --git a/Jellyfin.Server/Migrations/Routines/MigrateKeyframeData.cs b/Jellyfin.Server/Migrations/Routines/MigrateKeyframeData.cs
index 1cab943c1a..b8e69db8e7 100644
--- a/Jellyfin.Server/Migrations/Routines/MigrateKeyframeData.cs
+++ b/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)