From 739f45302b1551d3a99c432dbea50c7aa7132685 Mon Sep 17 00:00:00 2001 From: cadlaxa Date: Sat, 14 Sep 2024 07:55:48 +0800 Subject: [PATCH] cache folder fix --- OU Dictionary Editor/OpenUtau_Dictionary_Editor.pyw | 2 ++ 1 file changed, 2 insertions(+) diff --git a/OU Dictionary Editor/OpenUtau_Dictionary_Editor.pyw b/OU Dictionary Editor/OpenUtau_Dictionary_Editor.pyw index 514ee4d..9dde950 100644 --- a/OU Dictionary Editor/OpenUtau_Dictionary_Editor.pyw +++ b/OU Dictionary Editor/OpenUtau_Dictionary_Editor.pyw @@ -3950,6 +3950,8 @@ class Dictionary(TkinterDnD.Tk): self.cache_b = ttk.Button(cache_frame, text="Cache", style='Accent.TButton', command=self.clear_cache) self.cache_b.grid(row=2, column=0, padx=10, pady=10, sticky="ew") self.create_tooltip(self.cache_b, 'tp_cache_b', 'Clears out the Cache folder') + if not CACHE.exists(): + CACHE.mkdir(parents=True, exist_ok=True) self.observer = Observer() self.handler = CacheHandler(update_callback=self.update_cache_button_text) self.observer.schedule(self.handler, CACHE, recursive=True)