Added expanduser to paths
This commit is contained in:
parent
d9297b4312
commit
813eba5b1b
1 changed files with 4 additions and 3 deletions
|
@ -32,8 +32,9 @@ log = logging.getLogger('openfoam')
|
|||
|
||||
log.info('Starting program')
|
||||
|
||||
input_dir = Path(config.get('main', 'input_dir'), config.get('main', 'case'))
|
||||
work_dir = Path(config.get('main', 'work_dir'))
|
||||
input_dir = Path(config.get('main', 'input_dir'), config.get('main', 'case'))\
|
||||
.expanduser()
|
||||
work_dir = Path(config.get('main', 'work_dir')).expanduser()
|
||||
|
||||
if not work_dir.exists():
|
||||
log.error(f'Work directory ({work_dir}) not found')
|
||||
|
@ -59,7 +60,7 @@ if config.getboolean('stl', 'copy', fallback=False):
|
|||
('rm', '-r', stl_dir)
|
||||
)
|
||||
|
||||
stl_in = Path(config.get('stl', 'from'))
|
||||
stl_in = Path(config.get('stl', 'from')).expanduser()
|
||||
log.info(f'Copying stl directory ({stl_in} -> {stl_dir})')
|
||||
sp.run(
|
||||
('cp', '-r', stl_in, stl_dir)
|
||||
|
|
Reference in a new issue