Translate nsfw events to the events we're advertising

This commit is contained in:
Ash Wilson
2017-08-01 14:01:15 -04:00
parent afdb2f13a6
commit ba11070d16

View File

@@ -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
}))
}