summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Bruhin <git@the-compiler.org>2018-03-05 18:08:51 +0100
committerFlorian Bruhin <git@the-compiler.org>2018-03-05 18:08:51 +0100
commit4da8af0e1d04ef6d8f537b7d5a23f6962d67b1ff (patch)
treea7d4632f78bd6785aab835320756d2d71c85e2e2
parenta796d1f33f216369794a79fa7bf1147332ec35fe (diff)
downloadqutebrowser-4da8af0e1d04ef6d8f537b7d5a23f6962d67b1ff.tar.gz
qutebrowser-4da8af0e1d04ef6d8f537b7d5a23f6962d67b1ff.zip
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.
-rw-r--r--qutebrowser/utils/utils.py2
1 files changed, 1 insertions, 1 deletions
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)