Browse Source

Backport pull request #15220 from jellyfin/release-10.11.z

Skip extracted files in migration if bad timestamp or no access

Original-merge: a305204cfa43a97f255f0dea412f93d02de939c3

Merged-by: crobibero <cody@robibe.ro>

Backported-by: Bond_009 <bond.009@outlook.com>
JJBlue 1 week ago
parent
commit
21f65e2e27
1 changed files with 10 additions and 0 deletions
  1. 10 0
      Jellyfin.Server/Migrations/Routines/MigrateKeyframeData.cs

+ 10 - 0
Jellyfin.Server/Migrations/Routines/MigrateKeyframeData.cs

@@ -122,6 +122,16 @@ public class MigrateKeyframeData : IDatabaseMigrationRoutine
         {
         {
             lastWriteTimeUtc = File.GetLastWriteTimeUtc(filePath);
             lastWriteTimeUtc = File.GetLastWriteTimeUtc(filePath);
         }
         }
+        catch (ArgumentOutOfRangeException e)
+        {
+            _logger.LogDebug("Skipping {Path}: {Exception}", filePath, e.Message);
+            return null;
+        }
+        catch (UnauthorizedAccessException e)
+        {
+            _logger.LogDebug("Skipping {Path}: {Exception}", filePath, e.Message);
+            return null;
+        }
         catch (IOException e)
         catch (IOException e)
         {
         {
             _logger.LogDebug("Skipping {Path}: {Exception}", filePath, e.Message);
             _logger.LogDebug("Skipping {Path}: {Exception}", filePath, e.Message);