From 7990de2a315cd7f203e6defd5fbf9f5ea2830c4d Mon Sep 17 00:00:00 2001 From: Marcos Pinto Date: Tue, 1 Apr 2008 22:23:41 +0000 Subject: [PATCH] windows support in open_file --- deluge/common.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/deluge/common.py b/deluge/common.py index d21499628..2bd7149a2 100644 --- a/deluge/common.py +++ b/deluge/common.py @@ -127,7 +127,10 @@ def get_logo(size): def open_file(path): """Opens a file or folder.""" - os.popen("xdg-open \"%s\"" % path) + if windows_check(): + os.startfile("'%s'" % path) + else: + os.popen("xdg-open '%s'" % path) def open_url_in_browser(url): """Opens link in the desktop's default browser"""