From 6ca781134259302b9be71f4a3c7840da4ddca511 Mon Sep 17 00:00:00 2001 From: tigerbot Date: Fri, 21 Apr 2017 16:16:17 -0600 Subject: [PATCH] fixed bug with tray icon when run from other directories --- tray.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tray.js b/tray.js index c5697b5..4aca98c 100644 --- a/tray.js +++ b/tray.js @@ -1,3 +1,4 @@ +var path = require('path'); var electron = require('electron'); var app = electron.app; @@ -48,7 +49,7 @@ function checkLinuxTraySupport (cb) { } function createTray() { - tray = new electron.Tray('./images/daplie-logo.png'); + tray = new electron.Tray(path.join(__dirname, 'images', 'daplie-logo.png')); tray.on('click', function () { win.show(); }); updateTrayMenu(); }