Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
hu13 committed Jan 15, 2022
1 parent 0b76939 commit cf536d0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions windows.go
Expand Up @@ -453,6 +453,7 @@ func (w *Watcher) readEvents() {

// Point "raw" to the event in the buffer
raw := (*syscall.FileNotifyInformation)(unsafe.Pointer(&watch.buf[offset]))
// TODO: Consider using unsafe.Slice
// https://stackoverflow.com/questions/51187973/how-to-create-an-array-or-a-slice-from-an-array-unsafe-pointer-in-golang
// instead of using a fixed syscall.MAX_PATH buf, we create a buf that is the size of the path name
size := int(raw.FileNameLength / 2)
Expand Down

0 comments on commit cf536d0

Please sign in to comment.