File tree Expand file tree Collapse file tree
plugins-server/cloud9.ide.watcher Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -199,16 +199,16 @@ util.inherits(WatcherPlugin, Plugin);
199199 var watchers = this . clients [ clientId ] . fileWatchers ;
200200 if ( watchers [ path ] ) {
201201 if ( watchers [ path ] . watcher )
202- watchers [ path ] . watcher . close ( ) ;
202+ watchers [ path ] . watcher . close ? watchers [ path ] . watcher . close ( ) : watchers [ path ] . watcher . stop ( ) ;
203203 delete watchers [ path ] ;
204204 }
205205 } ;
206206
207207 this . removeDirectoryWatcher = function ( clientId , path ) {
208208 var watchers = this . clients [ clientId ] . directoryWatchers ;
209209 if ( watchers [ path ] ) {
210- if ( watchers . watcher )
211- watchers . watcher . close ( ) ;
210+ if ( watchers [ path ] . watcher )
211+ watchers [ path ] . watcher . close ? watchers [ path ] . watcher . close ( ) : watchers [ path ] . watcher . stop ( ) ;
212212 delete watchers [ path ] ;
213213 }
214214 } ;
You can’t perform that action at this time.
0 commit comments