This commit is contained in:
Markus Unterwaditzer 2015-01-12 20:45:15 +01:00
parent ce2cea130c
commit da8bba89de
2 changed files with 5 additions and 2 deletions

View file

@ -261,7 +261,10 @@ def load_config():
with open(fname) as f:
general, pairs, storages = read_config(f)
_validate_general_section(general)
general['status_path'] = os.path.join(fname, general['status_path'])
general['status_path'] = os.path.join(
os.path.dirname(fname),
expand_path(general['status_path'])
)
except Exception as e:
raise CliError('Error during reading config {}: {}'
.format(fname, e))

View file

@ -34,7 +34,7 @@ password_key_prefix = 'vdirsyncer:'
def expand_path(p):
p = os.path.expanduser(p)
p = os.path.abspath(p)
p = os.path.normpath(p)
return p