@@ -47,13 +47,13 @@ class WindowsApiEmitter(EventEmitter):
47
47
def __init__ (self , event_queue , watch , timeout = DEFAULT_EMITTER_TIMEOUT , event_filter = None ):
48
48
super ().__init__ (event_queue , watch , timeout , event_filter )
49
49
self ._lock = threading .Lock ()
50
- self ._handle = None
50
+ self ._dir_handle = None
51
51
52
52
def on_thread_start (self ):
53
53
watch_path = self .watch .path
54
54
if os .path .isfile (watch_path ):
55
55
watch_path = os .path .dirname (watch_path )
56
- self ._handle = get_directory_handle (watch_path )
56
+ self ._dir_handle = get_directory_handle (watch_path )
57
57
58
58
if platform .python_implementation () == "PyPy" :
59
59
@@ -65,11 +65,11 @@ def start(self):
65
65
sleep (0.01 )
66
66
67
67
def on_thread_stop (self ):
68
- if self ._handle :
69
- close_directory_handle (self ._handle )
68
+ if self ._dir_handle :
69
+ close_directory_handle (self ._dir_handle )
70
70
71
71
def _read_events (self ):
72
- return read_events (self ._handle , self .watch .path , self .watch .is_recursive )
72
+ return read_events (self ._dir_handle , self .watch .path , self .watch .is_recursive )
73
73
74
74
def queue_events (self , timeout ):
75
75
winapi_events = self ._read_events ()
0 commit comments