From 887a7645d4d2db294fb2ab2ba45c0c39dc28235d Mon Sep 17 00:00:00 2001 From: jeffser Date: Tue, 4 Jun 2024 19:56:49 -0600 Subject: [PATCH] Fix --- src/window.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/window.py b/src/window.py index a2c2ce0..1c68f4a 100644 --- a/src/window.py +++ b/src/window.py @@ -1163,10 +1163,10 @@ class AlpacaWindow(Adw.ApplicationWindow): def __init__(self, **kwargs): super().__init__(**kwargs) GtkSource.init() + if not os.path.exists(os.path.join(self.data_dir, "chats")): + os.makedirs(os.path.join(self.data_dir, "chats")) if os.path.exists(os.path.join(self.config_dir, "chats.json")) and not os.path.exists(os.path.join(self.data_dir, "chats", "chats.json")): update_history.update(self) - elif not os.path.exists(os.path.join(self.data_dir, "chats", "chats.json")): - self.save_history() self.set_help_overlay(self.shortcut_window) self.get_application().set_accels_for_action("win.show-help-overlay", ['slash']) self.get_application().create_action('new_chat', lambda *_: self.new_chat(), ['n'])