Skip to content

Commit

Permalink
Use buffer.Length as the source of truth for ReadDirectoryChanges (#7…
Browse files Browse the repository at this point in the history
…4023)

Co-authored-by: David Cantú <dacantu@microsoft.com>
  • Loading branch information
github-actions[bot] and jozkee committed Aug 17, 2022
1 parent 080f708 commit 12d9354
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ private unsafe void Monitor(AsyncReadState state)
continueExecuting = Interop.Kernel32.ReadDirectoryChangesW(
state.DirectoryHandle,
state.Buffer, // the buffer is kept pinned for the duration of the sync and async operation by the PreAllocatedOverlapped
_internalBufferSize,
(uint)state.Buffer.Length,
_includeSubdirectories,
(uint)_notifyFilters,
null,
Expand Down

0 comments on commit 12d9354

Please sign in to comment.