File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -99,7 +99,10 @@ func (p *pattern) allowReload(event *Event) bool {
9999 return false
100100 }
101101
102- return p .isValidPattern (event )
102+ // some editors create temporary files and never actually modify the original file
103+ // so we need to also check Event.AssociatedPathName
104+ // see https://github.com/php/frankenphp/issues/1375
105+ return p .isValidPattern (event .PathName ) || p .isValidPattern (event .AssociatedPathName )
103106}
104107
105108func (p * pattern ) handle (event * Event ) {
@@ -135,13 +138,9 @@ func isValidPathType(event *Event) bool {
135138 return event .PathType <= PathTypeHardLink
136139}
137140
138- // some editors create temporary files and never actually modify the original file
139- // so we need to also check Event.AssociatedPathName
140- // see https://github.com/php/frankenphp/issues/1375
141- func (p * pattern ) isValidPattern (event * Event ) bool {
142- fileName := event .AssociatedPathName
141+ func (p * pattern ) isValidPattern (fileName string ) bool {
143142 if fileName == "" {
144- fileName = event . PathName
143+ return false
145144 }
146145
147146 // first we remove the dir from the file name
You can’t perform that action at this time.
0 commit comments