aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server.Implementations/StorageHelpers
diff options
context:
space:
mode:
authorShadowghost <Ghost_of_Stone@web.de>2026-08-01 21:41:16 +0200
committerShadowghost <Ghost_of_Stone@web.de>2026-08-01 21:41:16 +0200
commit705368ee495cfb8967d3f1651318fbdb85ad89e6 (patch)
treed0c99252541c73ddeaddb036079a00808ab9a955 /Jellyfin.Server.Implementations/StorageHelpers
parentcbc2c7c32345f670d928f7840e5fd7422241845d (diff)
parente16c8a07bd8e21973a88231eeed83c9699fd58b2 (diff)
Merge remote-tracking branch 'upstream/master' into fix-byname-queries
# Conflicts: # src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/JellyfinDbModelSnapshot.cs
Diffstat (limited to 'Jellyfin.Server.Implementations/StorageHelpers')
-rw-r--r--Jellyfin.Server.Implementations/StorageHelpers/StorageHelper.cs5
1 files changed, 3 insertions, 2 deletions
diff --git a/Jellyfin.Server.Implementations/StorageHelpers/StorageHelper.cs b/Jellyfin.Server.Implementations/StorageHelpers/StorageHelper.cs
index 13c7895f83..0989ce84ba 100644
--- a/Jellyfin.Server.Implementations/StorageHelpers/StorageHelper.cs
+++ b/Jellyfin.Server.Implementations/StorageHelpers/StorageHelper.cs
@@ -87,8 +87,9 @@ public static class StorageHelper
/// </summary>
private static string ResolvePath(string path)
{
- var parts = path.Split(Path.DirectorySeparatorChar, StringSplitOptions.RemoveEmptyEntries);
- var current = Path.DirectorySeparatorChar.ToString();
+ var root = Path.GetPathRoot(path) ?? Path.DirectorySeparatorChar.ToString();
+ var parts = path.Substring(root.Length).Split(Path.DirectorySeparatorChar, StringSplitOptions.RemoveEmptyEntries);
+ var current = root;
foreach (var part in parts)
{
current = Path.Combine(current, part);