Skip to content

Commit

Permalink
fixed reading fliepaths with ~ from input file
Browse files Browse the repository at this point in the history
  • Loading branch information
kip-hart committed Oct 5, 2020
1 parent d815150 commit 13663c9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Added
Fixed
'''''''
- Color-by seed number in CLI TriMesh plot function.
- Expansion of "~" in input filepaths.

`1.3.5`_ - 2020-09-20
--------------------------
Expand Down
1 change: 1 addition & 0 deletions src/microstructpy/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -1084,6 +1084,7 @@ def dict_convert(dictionary, filepath='.'):
for key in dictionary:
val = dictionary[key]
if any([s in key.lower() for s in ('filename', 'directory')]):
val = os.path.expanduser(val)
if not os.path.isabs(val) and filepath:
new_val = os.path.abspath(os.path.join(filepath, val))
else:
Expand Down

0 comments on commit 13663c9

Please sign in to comment.