diff --git a/pyproject.toml b/pyproject.toml index da93dd3..bc77be8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,7 +14,7 @@ voxvera = ["templates/**", "src/**", "resources/**", "locales/**", "resources/bi [project] name = "voxvera" -version = "0.2.9" +version = "0.2.10" description = "VoxVera CLI utilities" readme = "README.md" authors = [{name = "VoxVera"}] diff --git a/tests/test_integrity.py b/tests/test_integrity.py index 7dbc3fe..5a3eed7 100644 --- a/tests/test_integrity.py +++ b/tests/test_integrity.py @@ -51,6 +51,7 @@ def test_export_import_roundtrip(tmp_path, monkeypatch): shutil.copytree(REPO_ROOT / "voxvera" / "src", tmp_path / "src") shutil.copytree(REPO_ROOT / "voxvera" / "locales", tmp_path / "locales") monkeypatch.setattr(cli, "ROOT", tmp_path) + monkeypatch.setattr(cli, "DATA_DIR", tmp_path) monkeypatch.setattr(cli, "_src_res", lambda *p: tmp_path / "src" / Path(*p)) monkeypatch.setattr(cli, "_locale_res", lambda *p: tmp_path / "locales" / Path(*p)) diff --git a/voxvera/__init__.py b/voxvera/__init__.py index 6e0fd05..f80336e 100644 --- a/voxvera/__init__.py +++ b/voxvera/__init__.py @@ -1,7 +1,7 @@ import sys from pathlib import Path -__version__ = "0.2.9" +__version__ = "0.2.10" # Add the vendor directory to sys.path. We prepend it to ensure our bundled # dependencies take priority over potentially incompatible system packages diff --git a/voxvera/cli.py b/voxvera/cli.py index da4f8f7..a99953d 100644 --- a/voxvera/cli.py +++ b/voxvera/cli.py @@ -803,9 +803,9 @@ def get_export_dir() -> Path: def export_site(folder_name: str, output_path: str = None): """Export a site folder and its keys into a zip archive.""" - source_dir = ROOT / "host" / folder_name + source_dir = DATA_DIR / "host" / folder_name if not source_dir.exists(): - print(f"Error: Site folder '{folder_name}' not found in {ROOT / 'host'}") + print(f"Error: Site folder '{folder_name}' not found in {DATA_DIR / 'host'}") return if not output_path: @@ -861,7 +861,7 @@ def import_site(zip_path: str): print("Error: Invalid config.json. Missing 'folder_name'.") return - dest_dir = ROOT / "host" / folder_name + dest_dir = DATA_DIR / "host" / folder_name if dest_dir.exists(): confirm = inquirer.confirm(message=f"Site '{folder_name}' already exists. Overwrite?").execute() if not confirm: