diff --git a/testbeam_analysis/tools/analysis_utils.py b/testbeam_analysis/tools/analysis_utils.py index b8f169bd..f7e8db39 100644 --- a/testbeam_analysis/tools/analysis_utils.py +++ b/testbeam_analysis/tools/analysis_utils.py @@ -1002,8 +1002,9 @@ def download_scibo(public_secret, path, filename): if not output: output = os.path.basename(path) - - output_path = os.path.dirname(os.path.realpath(path)) + output_path = os.path.dirname(os.path.realpath(path)) + else: + output_path = os.path.dirname(os.path.realpath(output)) if not os.path.isfile(os.path.join(output_path, output)): # Create output folder