Skip to content

The Free Software Media System - Server Backend & API

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

crobibero0f21222a0c87
diff --git a/Jellyfin.Server.Implementations/FullSystemBackup/BackupService.cs b/Jellyfin.Server.Implementations/FullSystemBackup/BackupService.cs
index e39a2b42f6..70483c36cc 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;
}