From 0f42e571326a772e5b0dada9995a0e1c03d15db6 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 14 Dec 2014 10:10:04 +0530 Subject: [PATCH] Fix command line arguments not being ignored on windows and linux when restarting calibre. Fixes #1401991 [Restarting calibre passes filenames](https://bugs.launchpad.net/calibre/+bug/1401991) --- src/calibre/gui2/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/calibre/gui2/main.py b/src/calibre/gui2/main.py index d8affc45f8..0077807e67 100644 --- a/src/calibre/gui2/main.py +++ b/src/calibre/gui2/main.py @@ -348,14 +348,14 @@ def run_gui(opts, args, listener, app, gui_debug=None): run_in_debug_mode() else: import subprocess - print 'Restarting with:', e, sys.argv + prints('Restarting with:', e) if hasattr(sys, 'frameworks_dir'): app = os.path.dirname(os.path.dirname(os.path.realpath(sys.frameworks_dir))) subprocess.Popen('sleep 3s; open ' + shellquote(app), shell=True) else: if iswindows and hasattr(winutil, 'prepare_for_restart'): winutil.prepare_for_restart() - subprocess.Popen([e] + sys.argv[1:]) + subprocess.Popen([e]) else: if iswindows: try: