Skip to content

Commit

Permalink
Merge pull request #105 from Zillode/max_path
Browse files Browse the repository at this point in the history
Use MAX_LONG_PATH instead of MAX_PATH
  • Loading branch information
ppknap authored Aug 20, 2016
2 parents f37d943 + 5b16291 commit 7e20c15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion watcher_readdcw.go
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ func (r *readdcw) loopevent(n uint32, overEx *overlappedEx) {
var currOffset uint32
for {
raw := (*syscall.FileNotifyInformation)(unsafe.Pointer(&overEx.parent.buffer[currOffset]))
name := syscall.UTF16ToString((*[syscall.MAX_PATH]uint16)(unsafe.Pointer(&raw.FileName))[:raw.FileNameLength>>1])
name := syscall.UTF16ToString((*[syscall.MAX_LONG_PATH]uint16)(unsafe.Pointer(&raw.FileName))[:raw.FileNameLength>>1])
events = append(events, &event{
pathw: overEx.parent.pathw,
filter: overEx.parent.filter,
Expand Down

0 comments on commit 7e20c15

Please sign in to comment.