From 55862c6a98863fc566ea510e2b25e7222cd5dae0 Mon Sep 17 00:00:00 2001 From: Patrick Armstrong Date: Sat, 23 Mar 2024 22:39:45 -0500 Subject: [PATCH] Remove trailing slash which breaks os.path.basename --- pippin/dataprep.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pippin/dataprep.py b/pippin/dataprep.py index 99f093ae..7727c1fe 100644 --- a/pippin/dataprep.py +++ b/pippin/dataprep.py @@ -40,6 +40,8 @@ def __init__(self, name, output_dir, config, options, global_config, dependencie if self.raw_dir is None: Task.fail_config(f"Unable to find {self.options.get('RAW_DIR')}") + if self.raw_dir[-1] == "/": + self.raw_dir = self.raw_dir[:-1] self.genversion = os.path.basename(self.raw_dir) self.data_path = os.path.dirname(self.raw_dir) if self.unparsed_raw == "$SCRATCH_SIMDIR" or "SNDATA_ROOT/SIM" in self.raw_dir: