From 4cd1cdf495e9e503fed34e8643c1e88203587cab Mon Sep 17 00:00:00 2001 From: Jack Date: Mon, 30 May 2016 04:37:34 -0400 Subject: [PATCH] escape spaces in paths given to reveal() --- lbrynet/lbrynet_daemon/LBRYDaemon.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lbrynet/lbrynet_daemon/LBRYDaemon.py b/lbrynet/lbrynet_daemon/LBRYDaemon.py index 4d1494f80..8c4389c89 100644 --- a/lbrynet/lbrynet_daemon/LBRYDaemon.py +++ b/lbrynet/lbrynet_daemon/LBRYDaemon.py @@ -2229,9 +2229,9 @@ class LBRYDaemon(jsonrpc.JSONRPC): path = p['path'] if sys.platform == "darwin": - d = threads.deferToThread(subprocess.Popen, ("open -R %s" % path), shell=True) + d = threads.deferToThread(subprocess.Popen, ("open -R %s" % path.replace(' ', '\ ')), shell=True) else: - d = threads.deferToThread(subprocess.Popen, ("xdg-open %s" % path), shell=True) + d = threads.deferToThread(subprocess.Popen, ("xdg-open %s" % path.replace(' ', '\ ')), shell=True) d.addCallback(lambda _: self._render_response(True, OK_CODE)) return d \ No newline at end of file