mirror of
https://github.com/SuperClaude-Org/SuperClaude_Framework.git
synced 2025-12-17 09:46:06 +00:00
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:
parent
3d378a83a7
commit
c05aa872b2
@ -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
|
||||
|
||||
|
||||
@ -156,9 +156,9 @@ class Installer:
|
||||
# Ensure temp backup directory exists
|
||||
temp_backup.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
# Copy all files except backups directory
|
||||
# Copy all files except backups and local directories
|
||||
for item in self.install_dir.iterdir():
|
||||
if item.name != "backups":
|
||||
if item.name not in ["backups", "local"]:
|
||||
try:
|
||||
if item.is_file():
|
||||
shutil.copy2(item, temp_backup / item.name)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user