diff options
| author | Cody Robibero <cody@robibe.ro> | 2026-08-01 08:18:45 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-08-01 08:18:45 -0400 |
| commit | 744ca84a8b5f0a5083d0e8c82e74dc62ca380ac7 (patch) | |
| tree | b53a4d90c1ad07d7a39d2fa2e9ba0b3889f98013 | |
| parent | c55fde25a54e9d2c2ba0e781d4a6f790990f85bd (diff) | |
| parent | 314004bc1939f531b22ee3303df7005e1b64f7c2 (diff) | |
Merge pull request #17500 from theguymadmax/fix-storage-lookup
Fix storage info lookup for Windows
| -rw-r--r-- | Jellyfin.Server.Implementations/StorageHelpers/StorageHelper.cs | 5 |
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); |
