diff --git a/src/daq/jobs/store/csv.py b/src/daq/jobs/store/csv.py index d70da76..3520112 100644 --- a/src/daq/jobs/store/csv.py +++ b/src/daq/jobs/store/csv.py @@ -77,6 +77,8 @@ def _open_csv_file( file_exists = os.path.exists(file_path) # Create the file if it doesn't exist if not file_exists: + # Create the directory if it doesn't exist + Path(os.path.dirname(file_path)).mkdir(parents=True, exist_ok=True) Path(file_path).touch() # Open file