Migrate ~/.autocoder/ to ~/.autoforge/ if needed. Provides backward compatibility by automatically renaming the old config directory to the new location on first access.
()
| 24 | |
| 25 | |
| 26 | def _migrate_registry_dir() -> None: |
| 27 | """Migrate ~/.autocoder/ to ~/.autoforge/ if needed. |
| 28 | |
| 29 | Provides backward compatibility by automatically renaming the old |
| 30 | config directory to the new location on first access. |
| 31 | """ |
| 32 | old_dir = Path.home() / ".autocoder" |
| 33 | new_dir = Path.home() / ".autoforge" |
| 34 | if old_dir.exists() and not new_dir.exists(): |
| 35 | try: |
| 36 | old_dir.rename(new_dir) |
| 37 | logger.info("Migrated registry directory: ~/.autocoder/ -> ~/.autoforge/") |
| 38 | except Exception: |
| 39 | logger.warning("Failed to migrate ~/.autocoder/ to ~/.autoforge/", exc_info=True) |
| 40 | |
| 41 | |
| 42 | # ============================================================================= |