From 326757917c6278eef6fcf47dab8ecc30a2214f37 Mon Sep 17 00:00:00 2001 From: meles5 Date: Thu, 15 Oct 2015 17:39:31 +0200 Subject: [PATCH] Fixed windows support (Windows test couldn't work) --- qutebrowser/utils/jinja.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/qutebrowser/utils/jinja.py b/qutebrowser/utils/jinja.py index 4482e1faa..b0b9c4a89 100644 --- a/qutebrowser/utils/jinja.py +++ b/qutebrowser/utils/jinja.py @@ -63,6 +63,11 @@ def _guess_autoescape(template_name): def resource_url(path): + # If Windows is the operating system, replace slashes with backslashes + if os.name == "nt": + path = path.replace("/", os.sep) + path = path[:-1] + image = utils.resource_filename(path) return QUrl.fromLocalFile(image).toString(QUrl.FullyEncoded)