mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-01-02 18:20:18 -05:00
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>
This commit is contained in:
parent
570b8b2eb9
commit
0f21222a0c
@ -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;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user