diff --git a/src/directory.coffee b/src/directory.coffee index b242386ef..d579b9db2 100644 --- a/src/directory.coffee +++ b/src/directory.coffee @@ -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: ->