From 1c7edf012a2d77425b74b601794c83a05871c4d0 Mon Sep 17 00:00:00 2001 From: reibs Date: Mon, 23 Sep 2024 17:08:27 -0700 Subject: [PATCH] fix join --- spellcaster/grammar.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spellcaster/grammar.py b/spellcaster/grammar.py index 6a78bb2..dfdbfba 100644 --- a/spellcaster/grammar.py +++ b/spellcaster/grammar.py @@ -203,7 +203,7 @@ def display_results(response: Grammar, path: str, repo_link: str = ""): parts = os.path.normpath(response.file_path).split(os.path.sep) if "samples" in parts: index = parts.index("samples") - relative_path = os.path.sep.join(parts[index+1:]) + relative_path = os.path.join(*parts[index+1:]) path = f"{repo_link.rstrip('/')}/blob/main/{relative_path}" else: # Fallback if 'samples' is not in the path