with_suffix strips .1 from 2019.1

This commit is contained in:
Martin Diehl 2020-07-16 09:33:17 +02:00
parent 190c9a1b0d
commit 2bbd68d964
1 changed files with 2 additions and 1 deletions

View File

@ -49,7 +49,8 @@ class Marc:
):
usersub = damask.environment.root_dir/Path(f'src/DAMASK_marc{self.version}').with_suffix('.f90' if compile else '.marc')
usersub = damask.environment.root_dir/Path(f'src/DAMASK_marc{self.version}')
usersub = usersub.parent/(usersub.name + ('.f90' if compile else '.marc'))
if not usersub.is_file():
raise FileNotFoundError("DAMASK4Marc ({}) '{}' not found".format(('source' if compile else 'binary'),usersub))