[#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.
This commit is contained in:
Calum Lind 2016-07-20 20:31:34 +01:00
parent d2385e9c75
commit 9c27ed29ae
1 changed files with 2 additions and 2 deletions

View File

@ -203,8 +203,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
process_args([filename])
self.osxapp.connect("NSApplicationOpenFile", nsapp_open_file)