Browse Source

Skip extracting directory entry when restoring (#15196)

Cody Robibero 1 day ago
parent
commit
0e4031ae52
1 changed files with 2 additions and 1 deletions
  1. 2 1
      Jellyfin.Server.Implementations/FullSystemBackup/BackupService.cs

+ 2 - 1
Jellyfin.Server.Implementations/FullSystemBackup/BackupService.cs

@@ -128,7 +128,8 @@ public class BackupService : IBackupService
                     var targetPath = Path.GetFullPath(Path.Combine(target, Path.GetRelativePath(source, item.FullName)));
 
                     if (!sourcePath.StartsWith(fullSourcePath, StringComparison.Ordinal)
-                        || !targetPath.StartsWith(fullTargetRoot, StringComparison.Ordinal))
+                        || !targetPath.StartsWith(fullTargetRoot, StringComparison.Ordinal)
+                        || Path.EndsInDirectorySeparator(item.FullName))
                     {
                         continue;
                     }