Fix SuperClaude installation and backup issues

- Remove empty hooks/ folder creation from core component
- Fix backup filename double extension (.tar.tar.gz) in installer
- Fix backup archive folder structure to avoid nested directories
- Ensure backups contain files directly without wrapper folders

🤖 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:30:52 +02:00
parent 45b7a244ad
commit 3d378a83a7
2 changed files with 4 additions and 3 deletions

View File

@@ -73,7 +73,7 @@ class CoreComponent(Component):
return False
# Create additional directories for other components
additional_dirs = ["commands", "hooks", "backups", "logs"]
additional_dirs = ["commands", "backups", "logs"]
for dirname in additional_dirs:
dir_path = self.install_dir / dirname
if not self.file_manager.ensure_directory(dir_path):

View File

@@ -170,8 +170,9 @@ class Installer:
# Create archive only if there are files to backup
if any(temp_backup.iterdir()):
shutil.make_archive(backup_path.with_suffix(''), 'gztar',
temp_dir, backup_name)
# Remove both .tar.gz extensions to prevent double extension
base_path = backup_path.with_suffix('').with_suffix('')
shutil.make_archive(str(base_path), 'gztar', temp_backup)
else:
# Create empty backup file to indicate backup was attempted
backup_path.touch()