Fix qute:javascript on Windows.

This commit is contained in:
Imran Sobir 2017-03-04 19:37:48 +05:00
parent 907d94591d
commit 0092b18c44

View File

@ -25,6 +25,7 @@ Module attributes:
"""
import json
import os
import sys
import time
import urllib.parse
@ -256,7 +257,8 @@ def qute_javascript(url):
"""
path = url.path()
if path:
return 'text/html', utils.read_file("javascript" + path, binary=False)
path = "javascript" + os.sep.join(path.split('/'))
return 'text/html', utils.read_file(path, binary=False)
else:
raise QuteSchemeError("No file specified", ValueError())