mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Translate nsfw events to the events we're advertising
This commit is contained in:
@@ -161,7 +161,16 @@ class NativeWatcher {
|
||||
const oldPath = path.join(event.directory, oldFileName)
|
||||
const newPath = newFileName && path.join(event.directory, newFileName)
|
||||
|
||||
return {oldPath, newPath, type}
|
||||
const payload = {type}
|
||||
|
||||
if (event.file) {
|
||||
payload.path = path.join(event.directory, event.file)
|
||||
} else {
|
||||
payload.oldPath = path.join(event.directory, event.oldFile)
|
||||
payload.path = path.join(event.directory, event.newFile)
|
||||
}
|
||||
|
||||
return payload
|
||||
}))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user