From 8a933d879c46fb268c222092cae4254cbf3ca2b9 Mon Sep 17 00:00:00 2001 From: Ash Wilson Date: Tue, 23 Apr 2019 11:53:25 -0400 Subject: [PATCH] Document why 'open-file' is there --- src/main-process/atom-application.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main-process/atom-application.js b/src/main-process/atom-application.js index 16c523fad..e371dc405 100644 --- a/src/main-process/atom-application.js +++ b/src/main-process/atom-application.js @@ -597,6 +597,9 @@ class AtomApplication extends EventEmitter { this.deleteSocketSecretFile() })) + // Triggered by the 'open-file' event from Electron: + // https://electronjs.org/docs/api/app#event-open-file-macos + // For example, this is fired when a file is dragged and dropped onto the dock. this.disposable.add(ipcHelpers.on(app, 'open-file', (event, pathToOpen) => { event.preventDefault() this.openPath({pathToOpen})