1
0
Fork 0
mirror of https://github.com/koniu/recoll-webui.git synced 2025-10-03 17:59:50 +02:00

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.
This commit is contained in:
koniu 2016-05-23 13:15:39 +01:00
parent 66321af8a3
commit cfb65646f4

View file

@ -106,7 +106,8 @@ def get_config():
# get useful things from recoll.conf # get useful things from recoll.conf
rclconf = rclconfig.RclConfig() rclconf = rclconfig.RclConfig()
config['confdir'] = rclconf.getConfDir() 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') config['stemlang'] = rclconf.getConfParam('indexstemminglanguages')
# get config from cookies or defaults # get config from cookies or defaults
for k, v in DEFAULTS.items(): for k, v in DEFAULTS.items():