diff --git a/.gitignore b/.gitignore index 496bff0..6cfc106 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ __pycache__ -notes/ \ No newline at end of file +notes/ + +.vscode/ diff --git a/__init__.py b/__init__.py index 154e2af..1f9cf43 100644 --- a/__init__.py +++ b/__init__.py @@ -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]: