Skip to content

Commit

Permalink
Merge pull request #198 from rjeczalik/issue-197
Browse files Browse the repository at this point in the history
readdcw: do not panic on invalid/zero actions
  • Loading branch information
rjeczalik authored Dec 10, 2020
2 parents 9c77608 + 80351c6 commit e2a77dc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions watcher_readdcw.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ package notify

import (
"errors"
"fmt"
"runtime"
"sync"
"sync/atomic"
Expand Down Expand Up @@ -588,7 +587,9 @@ func decode(filter, action uint32) (Event, Event) {
case syscall.FILE_ACTION_RENAMED_NEW_NAME:
return gensys(filter, Rename, FileActionRenamedNewName)
}
panic(fmt.Sprintln(`notify: cannot decode internal mask:`, action))
dbgprintf("cannot decode internal mask: %d", action)

return 0, 0
}

// gensys decides whether the Windows action, system-independent event or both
Expand Down

0 comments on commit e2a77dc

Please sign in to comment.