[PR #5614] [MERGED] Fix possible null ref exception #10396

Closed
opened 2025-12-22 08:01:45 +01:00 by backuprepo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/jellyfin/jellyfin/pull/5614
Author: @Bond-009
Created: 3/24/2021
Status: Merged
Merged: 3/25/2021
Merged by: @Bond-009

Base: masterHead: Bond-009-patch-2


📝 Commits (1)

  • 066c19a Fix possible null ref exception

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 Emby.Server.Implementations/Library/LibraryManager.cs (+1 -1)

📄 Description

Fixes a null ref when LibraryManager.IgnoreFile get called before LibraryManager.AddParts

[17:46:50 ERR] Error retrieving children folder
System.ArgumentNullException: Value cannot be null. (Parameter 'source')
   at System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
   at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source, Func`2 predicate)
   at Emby.Server.Implementations.Library.LibraryManager.IgnoreFile(FileSystemMetadata file, BaseItem parent) in D:\a\1\s\Emby.Server.Implementations\Library\LibraryManager.cs:line 622
   at Emby.Server.Implementations.Library.LibraryManager.ResolvePath(FileSystemMetadata fileInfo, IDirectoryService directoryService, IItemResolver[] resolvers, Folder parent, String collectionType, LibraryOptions libraryOptions) in D:\a\1\s\Emby.Server.Implementations\Library\LibraryManager.cs:line 568
   at Emby.Server.Implementations.Library.LibraryManager.ResolvePath(FileSystemMetadata fileInfo, Folder parent) in D:\a\1\s\Emby.Server.Implementations\Library\LibraryManager.cs:line 536
   at Emby.Server.Implementations.Library.LibraryManager.GetUserRootFolder() in D:\a\1\s\Emby.Server.Implementations\Library\LibraryManager.cs:line 812
   at Emby.Server.Implementations.Library.LibraryManager.GetTopFolderContentType(BaseItem item) in D:\a\1\s\Emby.Server.Implementations\Library\LibraryManager.cs:line 2197
   at Emby.Server.Implementations.Library.LibraryManager.GetInheritedContentType(BaseItem item) in D:\a\1\s\Emby.Server.Implementations\Library\LibraryManager.cs:line 2138
   at Emby.Server.Implementations.Library.LibraryManager.GetContentType(BaseItem item) in D:\a\1\s\Emby.Server.Implementations\Library\LibraryManager.cs:line 2133
   at MediaBrowser.Controller.Entities.Folder.GetNonCachedChildren(IDirectoryService directoryService) in D:\a\1\s\MediaBrowser.Controller\Entities\Folder.cs:line 600
   at MediaBrowser.Controller.Entities.AggregateFolder.GetNonCachedChildren(IDirectoryService directoryService) in D:\a\1\s\MediaBrowser.Controller\Entities\AggregateFolder.cs:line 153
   at MediaBrowser.Controller.Entities.Folder.ValidateChildrenInternal2(IProgress`1 progress, CancellationToken cancellationToken, Boolean recursive, Boolean refreshChildMetadata, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService) in D:\a\1\s\MediaBrowser.Controller\Entities\Folder.cs:line 320


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/jellyfin/jellyfin/pull/5614 **Author:** [@Bond-009](https://github.com/Bond-009) **Created:** 3/24/2021 **Status:** ✅ Merged **Merged:** 3/25/2021 **Merged by:** [@Bond-009](https://github.com/Bond-009) **Base:** `master` ← **Head:** `Bond-009-patch-2` --- ### 📝 Commits (1) - [`066c19a`](https://github.com/jellyfin/jellyfin/commit/066c19a26b1dbc36c20439426110738b2ce1c2d6) Fix possible null ref exception ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `Emby.Server.Implementations/Library/LibraryManager.cs` (+1 -1) </details> ### 📄 Description Fixes a null ref when `LibraryManager.IgnoreFile` get called before `LibraryManager.AddParts` ```cs [17:46:50 ERR] Error retrieving children folder System.ArgumentNullException: Value cannot be null. (Parameter 'source') at System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument) at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source, Func`2 predicate) at Emby.Server.Implementations.Library.LibraryManager.IgnoreFile(FileSystemMetadata file, BaseItem parent) in D:\a\1\s\Emby.Server.Implementations\Library\LibraryManager.cs:line 622 at Emby.Server.Implementations.Library.LibraryManager.ResolvePath(FileSystemMetadata fileInfo, IDirectoryService directoryService, IItemResolver[] resolvers, Folder parent, String collectionType, LibraryOptions libraryOptions) in D:\a\1\s\Emby.Server.Implementations\Library\LibraryManager.cs:line 568 at Emby.Server.Implementations.Library.LibraryManager.ResolvePath(FileSystemMetadata fileInfo, Folder parent) in D:\a\1\s\Emby.Server.Implementations\Library\LibraryManager.cs:line 536 at Emby.Server.Implementations.Library.LibraryManager.GetUserRootFolder() in D:\a\1\s\Emby.Server.Implementations\Library\LibraryManager.cs:line 812 at Emby.Server.Implementations.Library.LibraryManager.GetTopFolderContentType(BaseItem item) in D:\a\1\s\Emby.Server.Implementations\Library\LibraryManager.cs:line 2197 at Emby.Server.Implementations.Library.LibraryManager.GetInheritedContentType(BaseItem item) in D:\a\1\s\Emby.Server.Implementations\Library\LibraryManager.cs:line 2138 at Emby.Server.Implementations.Library.LibraryManager.GetContentType(BaseItem item) in D:\a\1\s\Emby.Server.Implementations\Library\LibraryManager.cs:line 2133 at MediaBrowser.Controller.Entities.Folder.GetNonCachedChildren(IDirectoryService directoryService) in D:\a\1\s\MediaBrowser.Controller\Entities\Folder.cs:line 600 at MediaBrowser.Controller.Entities.AggregateFolder.GetNonCachedChildren(IDirectoryService directoryService) in D:\a\1\s\MediaBrowser.Controller\Entities\AggregateFolder.cs:line 153 at MediaBrowser.Controller.Entities.Folder.ValidateChildrenInternal2(IProgress`1 progress, CancellationToken cancellationToken, Boolean recursive, Boolean refreshChildMetadata, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService) in D:\a\1\s\MediaBrowser.Controller\Entities\Folder.cs:line 320 ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
backuprepo 2025-12-22 08:01:45 +01:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: starred/jellyfin#10396
No description provided.