Skip to content

Commit a83507e

Browse files
authored
Fix: Prompt for credentials when a network share access is denied (#14904)
1 parent 2460818 commit a83507e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Files.App/Utils/Global/NetworkDrivesAPI.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ public static async Task<bool> AuthenticateNetworkShare(string path)
135135

136136
Win32Error connectionError = WNetAddConnection3(HWND.NULL, nr, null, null, 0); // if creds are saved, this will return NO_ERROR
137137

138-
if (connectionError == Win32Error.ERROR_LOGON_FAILURE)
138+
if (connectionError == Win32Error.ERROR_LOGON_FAILURE || connectionError == Win32Error.ERROR_ACCESS_DENIED)
139139
{
140140
var dialog = DynamicDialogFactory.GetFor_CredentialEntryDialog(path);
141141
await dialog.ShowAsync();

0 commit comments

Comments
 (0)