mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-05 01:50:27 +08:00
**Issue:**
Previous logic cleared entire destination directory, removing all existing files including user-created content.
**Fix:**
Modified `Backup-AndReplaceDirectory` to:
1. Backup entire destination directory (as before)
2. Only remove items in destination that match source item names
3. Copy source items to destination
4. Preserve all other files in destination directory
**New Behavior:**
- Removes: ~/.claude/commands (if exists in source)
- Removes: ~/.claude/workflows (if exists in source)
- Preserves: ~/.claude/custom-file.md (user-created)
- Preserves: ~/.claude/.workflow/ (session data)
**Example:**
Source: .claude/{commands, workflows, scripts}
Destination before: .claude/{commands, workflows, custom-config.json, .workflow/}
Destination after: .claude/{commands, workflows, scripts, custom-config.json, .workflow/}
**Benefits:**
- Protects user-created files and session data
- Only updates files that come from installation source
- Safer incremental updates
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
44 KiB
44 KiB