Exclude local/ folder from SuperClaude backups

- Update installer backup to exclude local/ directory containing Claude Code files
- Update backup command to skip files in local/ and backups/ directories
- Prevent Claude Code installation files from being included in SuperClaude backups

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
NomenAK
2025-08-14 22:35:14 +02:00
parent 3d378a83a7
commit c05aa872b2
2 changed files with 8 additions and 3 deletions

View File

@@ -309,13 +309,18 @@ def create_backup(args: argparse.Namespace) -> bool:
tar.add(temp_file.name, arcname="backup_metadata.json")
Path(temp_file.name).unlink() # Clean up temp file
# Add installation directory contents
# Add installation directory contents (excluding backups and local dirs)
files_added = 0
for item in args.install_dir.rglob("*"):
if item.is_file() and item != backup_file:
try:
# Create relative path for archive
rel_path = item.relative_to(args.install_dir)
# Skip files in excluded directories
if rel_path.parts and rel_path.parts[0] in ["backups", "local"]:
continue
tar.add(item, arcname=str(rel_path))
files_added += 1