mirror of
https://github.com/atom/atom.git
synced 2026-02-18 18:34:21 -05:00
Update path when move events occur
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user