From e66be42c81ca5e41b3bee88bf21db523bee8397f Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Wed, 20 Jul 2016 20:31:34 +0100 Subject: [PATCH] [#2768] [GTKUI] [OSX] Fix invalid file error at startup When installed to the system, not using .app, error is raised on startup as nsapp_open_file is ignoring Deluge-bin but not deluge or deluge-gtk for potential 'filename' when connecting NSApplicationOpenFile. --- deluge/ui/gtkui/gtkui.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deluge/ui/gtkui/gtkui.py b/deluge/ui/gtkui/gtkui.py index 8c38c0eeb..cd6fcc819 100644 --- a/deluge/ui/gtkui/gtkui.py +++ b/deluge/ui/gtkui/gtkui.py @@ -268,8 +268,8 @@ class GtkUI(object): if deluge.common.osx_check() and gtk.gdk.WINDOWING == "quartz": def nsapp_open_file(osxapp, filename): - # Will be raised at app launch (python opening main script) - if filename.endswith('Deluge-bin'): + # Ignore command name which is raised at app launch (python opening main script). + if filename == sys.argv[0]: return True from deluge.ui.gtkui.ipcinterface import process_args process_args([filename])