[IMP] config: allow defining addon_path in multiline
With a config like [options] addons_path: ~/foo, ~/bar '~/bar' was interprated as '\n ~/bar' and is considered as a local directory by os.path.abspath Fixes #4403
This commit is contained in:
committed by
Martin Trigaux
parent
4b387e73cb
commit
1656a7e503
@@ -449,7 +449,7 @@ class configmanager(object):
|
||||
self.options['addons_path'] = '%s,%s' % (base_addons, main_addons)
|
||||
else:
|
||||
self.options['addons_path'] = ",".join(
|
||||
os.path.abspath(os.path.expanduser(os.path.expandvars(x)))
|
||||
os.path.abspath(os.path.expanduser(os.path.expandvars(x.strip())))
|
||||
for x in self.options['addons_path'].split(','))
|
||||
|
||||
self.options['init'] = opt.init and dict.fromkeys(opt.init.split(','), 1) or {}
|
||||
|
||||
Reference in New Issue
Block a user