Update path when move events occur

This commit is contained in:
Kevin Sawicki
2013-03-20 14:18:40 -07:00
parent 6c357aaca7
commit 5f771978ac

View File

@@ -285,5 +285,8 @@ module.exports =
watchPath: (path, callback) ->
path = @absolute(path)
id = $native.watchPath(path, callback)
watchCallback = (eventType, eventPath) =>
path = @absolute(eventPath) if eventType is 'move'
callback(arguments...)
id = $native.watchPath(path, watchCallback)
unwatch: -> $native.unwatchPath(path, id)