From dc26aa354445da0decee64c0210615a47b787435 Mon Sep 17 00:00:00 2001 From: Nicolas MANGUE Date: Tue, 5 Mar 2024 10:30:00 +0100 Subject: [PATCH] Prompt for credentials when a network share access is denied --- src/Files.App/Utils/Global/NetworkDrivesAPI.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Files.App/Utils/Global/NetworkDrivesAPI.cs b/src/Files.App/Utils/Global/NetworkDrivesAPI.cs index f9d08f87048f..5b43b3ca27ea 100644 --- a/src/Files.App/Utils/Global/NetworkDrivesAPI.cs +++ b/src/Files.App/Utils/Global/NetworkDrivesAPI.cs @@ -135,7 +135,7 @@ public static async Task AuthenticateNetworkShare(string path) Win32Error connectionError = WNetAddConnection3(HWND.NULL, nr, null, null, 0); // if creds are saved, this will return NO_ERROR - if (connectionError == Win32Error.ERROR_LOGON_FAILURE) + if (connectionError == Win32Error.ERROR_LOGON_FAILURE || connectionError == Win32Error.ERROR_ACCESS_DENIED) { var dialog = DynamicDialogFactory.GetFor_CredentialEntryDialog(path); await dialog.ShowAsync();