diff --git a/nnote/commands/init.py b/nnote/commands/init.py index e851735..278b7fe 100644 --- a/nnote/commands/init.py +++ b/nnote/commands/init.py @@ -33,7 +33,7 @@ def init(): config.set("backup_dir", value=str(backup_dir)) config.save() - click.echo(f"Config saved to {config._path}") + click.echo(f"Config saved to {config.path}") click.echo(f"Notes directory: {notes_dir}") click.echo(f"Editor: {editor}") if backup_dir_raw: diff --git a/nnote/config.py b/nnote/config.py index fc6389d..5702d5d 100644 --- a/nnote/config.py +++ b/nnote/config.py @@ -40,6 +40,10 @@ def load(cls, path: Path | None = None) -> Config: return cls(path, data) + @property + def path(self) -> Path: + return self._path + def save(self) -> None: """Write current config data to disk atomically.""" fd, tmp = tempfile.mkstemp(dir=self._path.parent, suffix=".tmp")