mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-20 05:04:18 +01:00
More efficient array creation (#11468)
This commit is contained in:
@@ -116,8 +116,8 @@ namespace MediaBrowser.Controller.Library
|
||||
{
|
||||
get
|
||||
{
|
||||
var paths = string.IsNullOrEmpty(Path) ? Array.Empty<string>() : new[] { Path };
|
||||
return AdditionalLocations is null ? paths : paths.Concat(AdditionalLocations).ToArray();
|
||||
var paths = string.IsNullOrEmpty(Path) ? Array.Empty<string>() : [Path];
|
||||
return AdditionalLocations is null ? paths : [..paths, ..AdditionalLocations];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user