diff --git a/core/game.py b/core/game.py index d2eb1ea..c5997f9 100644 --- a/core/game.py +++ b/core/game.py @@ -240,7 +240,7 @@ class Game: black = re.sub(r"['<>:\"/\\|?*]", "", black or "Black") white = re.sub(r"['<>:\"/\\|?*]", "", white or "White") game_name = f"katrain_{black} vs {white} {self.game_id}" - file_name = os.path.join(path, f"{game_name}.sgf") + file_name = os.path.abspath(os.path.join(path, f"{game_name}.sgf")) os.makedirs(os.path.dirname(file_name), exist_ok=True) show_dots_for = {p: trainer_config.get("eval_show_ai", True) or "ai" not in self.katrain.controls.player_mode(p) for p in Move.PLAYERS} diff --git a/katrain.py b/katrain.py index 4ef54ae..63abe8d 100644 --- a/katrain.py +++ b/katrain.py @@ -187,7 +187,7 @@ class KaTrainGui(BoxLayout): self.fileselect_popup = Popup(title="Double Click SGF file to analyze", size_hint=(0.8, 0.8)).__self__ popup_contents = LoadSGFPopup() self.fileselect_popup.add_widget(popup_contents) - popup_contents.filesel.path = os.path.expanduser(self.config("sgf/sgf_load")) + popup_contents.filesel.path = os.path.abspath(os.path.expanduser(self.config("sgf/sgf_load"))) def readfile(files, _mouse): self.fileselect_popup.dismiss()