Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit ad0cd74

Browse files
committedJul 4, 2024·
Fix
1 parent 3946f99 commit ad0cd74

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed
 

‎src/Files.App/ViewModels/Properties/SecurityAdvancedViewModel.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
// Licensed under the MIT License. See the LICENSE.
33

44
using Microsoft.UI.Xaml;
5-
using Vanara.PInvoke;
65
using Windows.Storage;
6+
using Windows.Win32.Foundation;
77

88
namespace Files.App.ViewModels.Properties
99
{
@@ -175,7 +175,7 @@ private void LoadAccessControlEntry()
175175
{
176176
DisplayElements = false;
177177

178-
if (error == Win32Error.ERROR_ACCESS_DENIED)
178+
if (error is WIN32_ERROR.ERROR_ACCESS_DENIED)
179179
{
180180
ErrorMessage =
181181
"SecurityRequireReadPermissions".GetLocalizedResource() +

‎src/Files.App/ViewModels/Properties/SecurityViewModel.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
using CommunityToolkit.WinUI;
55
using Microsoft.UI.Xaml;
6-
using Vanara.PInvoke;
76
using Windows.Storage;
7+
using Windows.Win32.Foundation;
88

99
namespace Files.App.ViewModels.Properties
1010
{
@@ -97,7 +97,7 @@ public SecurityViewModel(PropertiesPageNavigationParameter parameter)
9797
if (!AccessControlList.IsValid)
9898
{
9999
DisplayElements = false;
100-
ErrorMessage = error == Win32Error.ERROR_ACCESS_DENIED
100+
ErrorMessage = error is WIN32_ERROR.ERROR_ACCESS_DENIED
101101
? "SecurityRequireReadPermissions".GetLocalizedResource() + "\r\n" + "SecurityClickAdvancedPermissions".GetLocalizedResource()
102102
: "SecurityUnableToDisplayPermissions".GetLocalizedResource();
103103
}

0 commit comments

Comments
 (0)
Please sign in to comment.