Skip to content

Commit 52c8594

Browse files
authored
Discard changes to src/Files.App/ViewModels/ShellViewModel.cs
1 parent e3408e9 commit 52c8594

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/Files.App/ViewModels/ShellViewModel.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
using System.Runtime.CompilerServices;
1515
using System.Runtime.InteropServices;
1616
using Vanara.Windows.Shell;
17-
using Windows.Win32;
1817
using Windows.Foundation;
1918
using Windows.Storage;
2019
using Windows.Storage.FileProperties;
@@ -2125,7 +2124,7 @@ private void WatchForDirectoryChanges(string path, CloudDriveSyncStatus syncStat
21252124
notifyFilters |= FILE_NOTIFY_CHANGE_ATTRIBUTES;
21262125

21272126
var overlapped = new OVERLAPPED();
2128-
overlapped.hEvent = PInvoke.CreateEvent(null, false, false, null).DangerousGetHandle();
2127+
overlapped.hEvent = CreateEvent(IntPtr.Zero, false, false, null);
21292128
const uint INFINITE = 0xFFFFFFFF;
21302129

21312130
while (x.Status != AsyncStatus.Canceled)
@@ -2236,7 +2235,7 @@ private void WatchForGitChanges()
22362235
var notifyFilters = FILE_NOTIFY_CHANGE_DIR_NAME | FILE_NOTIFY_CHANGE_FILE_NAME | FILE_NOTIFY_CHANGE_LAST_WRITE | FILE_NOTIFY_CHANGE_SIZE | FILE_NOTIFY_CHANGE_CREATION;
22372236

22382237
var overlapped = new OVERLAPPED();
2239-
overlapped.hEvent = PInvoke.CreateEvent(null, false, false, null).DangerousGetHandle();
2238+
overlapped.hEvent = CreateEvent(IntPtr.Zero, false, false, null);
22402239
const uint INFINITE = 0xFFFFFFFF;
22412240

22422241
while (x.Status != AsyncStatus.Canceled)

0 commit comments

Comments
 (0)