From cfb65646f469e43f1b2c789a0d49e0300f58fbbc Mon Sep 17 00:00:00 2001 From: koniu Date: Mon, 23 May 2016 13:15:39 +0100 Subject: [PATCH] Expand tilde in topdirs (fixes #50) Topdirs in recoll.conf starting with ~ wouldn't show in 'Folder' dropdown because glob.glob() doesn't do tilde expansion. Explicit os.path.expanduser() added. --- webui.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/webui.py b/webui.py index 980a6d9..15f326a 100755 --- a/webui.py +++ b/webui.py @@ -106,7 +106,8 @@ def get_config(): # get useful things from recoll.conf rclconf = rclconfig.RclConfig() config['confdir'] = rclconf.getConfDir() - config['dirs'] = shlex.split(rclconf.getConfParam('topdirs')) + config['dirs'] = [os.path.expanduser(d) for d in + shlex.split(rclconf.getConfParam('topdirs'))] config['stemlang'] = rclconf.getConfParam('indexstemminglanguages') # get config from cookies or defaults for k, v in DEFAULTS.items():