Skip to content

Commit

Permalink
Remove trailing slash which breaks os.path.basename
Browse files Browse the repository at this point in the history
  • Loading branch information
OmegaLambda1998 committed Mar 24, 2024
1 parent 1fb0dcf commit 55862c6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pippin/dataprep.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 55862c6

Please sign in to comment.