mirror of
https://github.com/atom/atom.git
synced 2026-01-23 05:48:10 -05:00
Only watch path once
This commit is contained in:
@@ -96,8 +96,9 @@ class Directory
|
||||
|
||||
# Private:
|
||||
subscribeToNativeChangeEvents: ->
|
||||
@watchSubscription = pathWatcher.watch @path, (eventType) =>
|
||||
@emit "contents-changed" if eventType is "change"
|
||||
if @watchSubscription?
|
||||
@watchSubscription = pathWatcher.watch @path, (eventType) =>
|
||||
@emit "contents-changed" if eventType is "change"
|
||||
|
||||
# Private:
|
||||
unsubscribeFromNativeChangeEvents: ->
|
||||
|
||||
Reference in New Issue
Block a user