From 196dc2acecde155d668e6eb1a8448e59b41f0e34 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 7 Nov 2014 21:09:34 +0530 Subject: [PATCH] Forgot one place where env vars should be sanitized when launching external programs on windows --- src/calibre/gui2/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/calibre/gui2/__init__.py b/src/calibre/gui2/__init__.py index 3ee6967893..850fe97756 100644 --- a/src/calibre/gui2/__init__.py +++ b/src/calibre/gui2/__init__.py @@ -1141,7 +1141,8 @@ def get_current_db(): def open_local_file(path): if iswindows: - os.startfile(os.path.normpath(path)) + with sanitize_env_vars(): + os.startfile(os.path.normpath(path)) else: url = QUrl.fromLocalFile(path) open_url(url)