From 4da8af0e1d04ef6d8f537b7d5a23f6962d67b1ff Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 5 Mar 2018 18:08:51 +0100 Subject: [PATCH] Fix preloading resources on Windows We always pass paths like javascript/scroll.js no matter what the underlying OS is, so we also need to cache it with a / separator. --- qutebrowser/utils/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qutebrowser/utils/utils.py b/qutebrowser/utils/utils.py index 9f3acde5a..da1ddf085 100644 --- a/qutebrowser/utils/utils.py +++ b/qutebrowser/utils/utils.py @@ -147,7 +147,7 @@ def preload_resources(): for subdir, pattern in [('html', '*.html'), ('javascript', '*.js')]: path = resource_filename(subdir) for full_path in glob.glob(os.path.join(path, pattern)): - sub_path = os.path.join(subdir, os.path.basename(full_path)) + sub_path = '/'.join([subdir, os.path.basename(full_path)]) _resource_cache[sub_path] = read_file(sub_path)