Use comfy user directory
This commit is contained in:
+3
-1
@@ -1,2 +1,4 @@
|
||||
__pycache__
|
||||
notes/
|
||||
notes/
|
||||
|
||||
.vscode/
|
||||
|
||||
+6
-1
@@ -11,7 +11,12 @@ NODE_DISPLAY_NAME_MAPPINGS = {}
|
||||
|
||||
class NotesManager:
|
||||
def __init__(self):
|
||||
self.notes_dir = os.path.join(os.path.dirname(__file__), "notes")
|
||||
user_dir = folder_paths.get_user_directory()
|
||||
if user_dir and os.path.isdir(user_dir):
|
||||
self.notes_dir = os.path.join(user_dir, "default", "comfyui-notes-sidebar", "notes")
|
||||
else:
|
||||
self.notes_dir = os.path.join(os.path.dirname(__file__), "notes")
|
||||
|
||||
os.makedirs(self.notes_dir, exist_ok=True)
|
||||
|
||||
def get_notes_list(self) -> list[str]:
|
||||
|
||||
Reference in New Issue
Block a user