Skip to content

Commit

Permalink
Fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
untitaker committed Jan 12, 2015
1 parent ce2cea1 commit da8bba8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion vdirsyncer/cli/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion vdirsyncer/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

def expand_path(p):
p = os.path.expanduser(p)
p = os.path.abspath(p)
p = os.path.normpath(p)
return p


Expand Down

0 comments on commit da8bba8

Please sign in to comment.