diff options
| author | Rich Lander <rlander@microsoft.com> | 2021-07-30 10:44:43 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-30 10:44:43 -0700 |
| commit | 47da13613b143794e1f1422e05dac63a40f5f66a (patch) | |
| tree | 59ec139682ed5a61f7c24ccf9e6df434cffad04a /Emby.Server.Implementations/Collections/CollectionManager.cs | |
| parent | 927b003143f7e4772e21b767f2524f969ddf1ad8 (diff) | |
| parent | 0ee74b293d1f6fa1be63b8b4e5e2498a7f18298f (diff) | |
Merge branch 'master' into media-provides-analysis-fixes
Diffstat (limited to 'Emby.Server.Implementations/Collections/CollectionManager.cs')
| -rw-r--r-- | Emby.Server.Implementations/Collections/CollectionManager.cs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Emby.Server.Implementations/Collections/CollectionManager.cs b/Emby.Server.Implementations/Collections/CollectionManager.cs index 4fc33e2ea..08acd1767 100644 --- a/Emby.Server.Implementations/Collections/CollectionManager.cs +++ b/Emby.Server.Implementations/Collections/CollectionManager.cs @@ -82,12 +82,10 @@ namespace Emby.Server.Implementations.Collections internal async Task<Folder> EnsureLibraryFolder(string path, bool createIfNeeded) { - var existingFolders = FindFolders(path) - .ToList(); - - if (existingFolders.Count > 0) + var existingFolder = FindFolders(path).FirstOrDefault(); + if (existingFolder != null) { - return existingFolders[0]; + return existingFolder; } if (!createIfNeeded) |
