From 31df5c204212fa6f934a79c5c8dc1ed07c15fd0d Mon Sep 17 00:00:00 2001 From: Junzi Sun Date: Thu, 21 Feb 2019 14:39:57 +0100 Subject: [PATCH] fix dump path --- pyModeS/streamer/modeslive | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pyModeS/streamer/modeslive b/pyModeS/streamer/modeslive index 50bbd48..06664cf 100755 --- a/pyModeS/streamer/modeslive +++ b/pyModeS/streamer/modeslive @@ -36,7 +36,10 @@ UNCERTAINTY = args.uncertainty DUMPTO = args.dumpto if DUMPTO is not None: - DUMPTO = os.getcwd() + '/' + DUMPTO + # append to current folder except root is given + if DUMPTO[0] != '/': + DUMPTO = os.getcwd() + '/' + DUMPTO + if not os.path.isdir(DUMPTO): print('Error: dump folder (%s) does not exist' % DUMPTO) sys.exit(1)