Prevent slashes from being stripped on Windows

This commit is contained in:
Philipp Hansch 2016-03-29 13:25:04 +02:00
parent b1ecdf2924
commit 8a619ea84c

View File

@ -140,11 +140,10 @@ def run_userscript(quteproc, userscript):
Wrapper around :spawn --userscript {userscript} that uses an absolute
path.
"""
joined_path = os.path.join(utils.abs_datapath(__file__),
'userscripts', userscript)
abs_userscript_path = os.path.abspath(joined_path)
abs_userscript_path = os.path.join(utils.abs_datapath(__file__),
'userscripts', userscript)
cmd = ':spawn --userscript {abs_userscript_path}'
cmd = ':spawn --userscript "{abs_userscript_path}"'
quteproc.send_cmd(cmd.format(abs_userscript_path=abs_userscript_path))