aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2025-03-26 14:59:08 -0500
committerJP Dillingham <jp@dillingham.me>2025-03-26 14:59:08 -0500
commitfcc0499ca6846f42820e952663fc1b4067e11634 (patch)
treedf21c365df875ee1f326ee43a46c231cd15c9081 /src
parent87323146bbca590834a72016e285c86f9a1d29b7 (diff)
downloadslskd-fcc0499ca6846f42820e952663fc1b4067e11634.tar.gz
fix directory contents resolver
Diffstat (limited to 'src')
-rw-r--r--src/slskd/Application.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/slskd/Application.cs b/src/slskd/Application.cs
index 791cf245..e5681442 100644
--- a/src/slskd/Application.cs
+++ b/src/slskd/Application.cs
@@ -1258,18 +1258,18 @@ namespace slskd
/// <param name="token">The unique token for the request, supplied by the requesting user.</param>
/// <param name="directory">The requested directory.</param>
/// <returns>A Task resolving an instance of Soulseek.Directory containing the contents of the requested directory.</returns>
- private async Task<Soulseek.Directory> DirectoryContentsResponseResolver(string username, IPEndPoint endpoint, int token, string directory)
+ private async Task<IEnumerable<Soulseek.Directory>> DirectoryContentsResponseResolver(string username, IPEndPoint endpoint, int token, string directory)
{
if (Users.IsBlacklisted(username, endpoint.Address))
{
Log.Information("Returned empty directory listing for blacklisted user {Username} ({IP})", username, endpoint.Address);
- return new Soulseek.Directory(directory);
+ return [new Soulseek.Directory(directory)];
}
try
{
var dir = await Shares.ListDirectoryAsync(directory);
- return dir;
+ return [dir];
}
catch (Exception ex)
{