diff --git a/cam.py b/cam.py index 96d37ba..1dcc648 100644 --- a/cam.py +++ b/cam.py @@ -19,12 +19,15 @@ from cam.import_transcripts import import_transcripts, list_archive_sessions # def _default_cam_command(config_path: Path | None) -> str: if config_path is not None: - rel = config_path + rel_config: Path | str = config_path try: - rel = config_path.relative_to(CAM_ROOT) + rel_config = config_path.relative_to(CAM_ROOT.parent.parent) except ValueError: - rel = config_path - return f"python tools/cam/cam.py -c {rel} export" + try: + rel_config = Path("tools/cam") / config_path.relative_to(CAM_ROOT) + except ValueError: + rel_config = config_path + return f"python tools/cam/cam.py -c {rel_config} export" return "python tools/cam/cam.py export"