Fix path building for config dir and data dir
The paths are now correctly built in the case where $XDG_DATA_HOME and $XDG_CONFIG_HOME are not empty: the "weboob/" suffix was in the fallback argument of the os.get.environ. Signed-off-by: Olivier Schwander <olivier.schwander@ens-lyon.org> Signed-off-by: Romain Bignon <romain@symlink.me>
This commit is contained in:
parent
dee6edef01
commit
825dc0b5b1
1 changed files with 2 additions and 2 deletions
|
|
@ -58,8 +58,8 @@ class Weboob(object):
|
|||
datadir = workdir = os.environ.get('WEBOOB_WORKDIR')
|
||||
else:
|
||||
old_workdir = os.path.join(os.path.expanduser('~'), '.weboob')
|
||||
xdg_config_home = os.environ.get('XDG_CONFIG_HOME', os.path.join(os.path.expanduser('~'), '.config', 'weboob'))
|
||||
xdg_data_home = os.environ.get('XDG_DATA_HOME', os.path.join(os.path.expanduser('~'), '.local', 'share', 'weboob'))
|
||||
xdg_config_home = os.path.join(os.environ.get('XDG_CONFIG_HOME', os.path.join(os.path.expanduser('~'), '.config')), 'weboob')
|
||||
xdg_data_home = os.path.join(os.environ.get('XDG_DATA_HOME', os.path.join(os.path.expanduser('~'), '.local')), 'share', 'weboob')
|
||||
|
||||
if os.path.isdir(old_workdir):
|
||||
self.logger.warning('You are using "%s" as working directory. Files are moved into %s and %s.'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue