diff options
Diffstat (limited to 'Emby.Server.Implementations')
| -rw-r--r-- | Emby.Server.Implementations/Library/LibraryManager.cs | 9 |
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(); } |
