From 56cdbbd85cdb8ee7b11c49a87c90188e6a444320 Mon Sep 17 00:00:00 2001 From: Filippo Ferrario Date: Thu, 11 May 2023 15:04:53 +0200 Subject: [PATCH] Fix: Credentials dialog isn't shown when accessing FTP --- src/Files.App/ViewModels/ItemViewModel.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Files.App/ViewModels/ItemViewModel.cs b/src/Files.App/ViewModels/ItemViewModel.cs index a2f45159689b..089171443045 100644 --- a/src/Files.App/ViewModels/ItemViewModel.cs +++ b/src/Files.App/ViewModels/ItemViewModel.cs @@ -1442,15 +1442,15 @@ public async Task EnumerateItemsFromSpecialFolderAsync(string path) client.Port = FtpHelpers.GetFtpPort(path); client.Credentials = FtpManager.Credentials.Get(client.Host, FtpManager.Anonymous); - static Task WrappedAutoConnectFtpAsync(AsyncFtpClient client) + static async Task WrappedAutoConnectFtpAsync(AsyncFtpClient client) { try { - return client.AutoConnect(); + return await client.AutoConnect(); } catch (FtpAuthenticationException) { - return Task.FromResult(null); + return null; } throw new InvalidOperationException();