diff options
| author | crobibero <cody@robibe.ro> | 2025-10-27 15:43:25 -0400 |
|---|---|---|
| committer | Bond_009 <bond.009@outlook.com> | 2025-10-27 15:43:25 -0400 |
| commit | 0f21222a0c873b9e3e258ec6c3ed32278b41614f (patch) | |
| tree | 276f2d6ba1fb3571f68e9d7bebcfa4b24ff3bd74 /Jellyfin.Server.Implementations/FullSystemBackup/BackupService.cs | |
| parent | 570b8b2eb979c3dbcf996a6fa9b4c29d3c27f230 (diff) | |
Backport pull request #15196 from jellyfin/release-10.11.z
Skip directory entry when restoring from backup
Original-merge: 0e4031ae52b2ca3a19e22bfc6ab9c9af88944bd8
Merged-by: crobibero <cody@robibe.ro>
Backported-by: Bond_009 <bond.009@outlook.com>
Diffstat (limited to 'Jellyfin.Server.Implementations/FullSystemBackup/BackupService.cs')
| -rw-r--r-- | Jellyfin.Server.Implementations/FullSystemBackup/BackupService.cs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Jellyfin.Server.Implementations/FullSystemBackup/BackupService.cs b/Jellyfin.Server.Implementations/FullSystemBackup/BackupService.cs index e39a2b42f..70483c36c 100644 --- a/Jellyfin.Server.Implementations/FullSystemBackup/BackupService.cs +++ b/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; } |
