fix dump path

This commit is contained in:
Junzi Sun 2019-02-21 14:39:57 +01:00
parent 10e9b234ad
commit 31df5c2042

View File

@ -36,7 +36,10 @@ UNCERTAINTY = args.uncertainty
DUMPTO = args.dumpto DUMPTO = args.dumpto
if DUMPTO is not None: if DUMPTO is not None:
# append to current folder except root is given
if DUMPTO[0] != '/':
DUMPTO = os.getcwd() + '/' + DUMPTO DUMPTO = os.getcwd() + '/' + DUMPTO
if not os.path.isdir(DUMPTO): if not os.path.isdir(DUMPTO):
print('Error: dump folder (%s) does not exist' % DUMPTO) print('Error: dump folder (%s) does not exist' % DUMPTO)
sys.exit(1) sys.exit(1)