aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Library/LibraryManager.cs
diff options
context:
space:
mode:
authorShadowghost <Ghost_of_Stone@web.de>2026-10-24 11:33:46 +0200
committerShadowghost <Ghost_of_Stone@web.de>2026-10-24 11:33:46 +0200
commit6561d58ad512bdc4dfd6dacf55a5b03b2a143623 (patch)
tree6d69ad73d1202fb8c70a876caf47bf25a3b600bf /Emby.Server.Implementations/Library/LibraryManager.cs
parent0c817274b76aebcc07b4c4de068dd6d06eb45d9c (diff)
Fix review comments
Diffstat (limited to 'Emby.Server.Implementations/Library/LibraryManager.cs')
-rw-r--r--Emby.Server.Implementations/Library/LibraryManager.cs9
1 files changed, 8 insertions, 1 deletions
diff --git a/Emby.Server.Implementations/Library/LibraryManager.cs b/Emby.Server.Implementations/Library/LibraryManager.cs
index 6d8e9abc45..c877c8bf2c 100644
--- a/Emby.Server.Implementations/Library/LibraryManager.cs
+++ b/Emby.Server.Implementations/Library/LibraryManager.cs
@@ -1678,7 +1678,14 @@ namespace Emby.Server.Implementations.Library
// Reads the .mblink files directly; going through RootFolder.Children would re-enter the resolver.
private IEnumerable<string> GetLibraryRootPaths()
{
- return _fileSystem.GetDirectoryPaths(_configurationManager.ApplicationPaths.DefaultUserViewsPath)
+ // root/default only exists once the user root folder or a library has been created
+ var userViewsPath = _configurationManager.ApplicationPaths.DefaultUserViewsPath;
+ if (!_fileSystem.DirectoryExists(userViewsPath))
+ {
+ return [];
+ }
+
+ return _fileSystem.GetDirectoryPaths(userViewsPath)
.SelectMany(GetVirtualFolderLocations)
.ToList();
}