From 0fcf6d1ee33484efc4dc727004487c92f88b11bb Mon Sep 17 00:00:00 2001 From: Willie Date: Wed, 11 Mar 2026 16:03:32 +0800 Subject: [PATCH] feat(sync): update extras source path to extras// with auto-migration --- cmd/skillshare/sync_extras.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/cmd/skillshare/sync_extras.go b/cmd/skillshare/sync_extras.go index 02663907a..c03cb3fe7 100644 --- a/cmd/skillshare/sync_extras.go +++ b/cmd/skillshare/sync_extras.go @@ -37,7 +37,14 @@ func cmdSyncExtras(args []string) error { return nil } - sourceRoot := filepath.Dir(cfg.Source) // ~/.config/skillshare/ + configDir := filepath.Dir(cfg.Source) + + // Auto-migrate legacy extras directories (flat → extras//) + if warnings := config.MigrateExtrasDir(configDir, cfg.Extras); len(warnings) > 0 { + for _, w := range warnings { + ui.Warning(w) + } + } if dryRun { ui.Warning("Dry run mode - no changes will be made") @@ -46,7 +53,7 @@ func cmdSyncExtras(args []string) error { var totalSynced, totalSkipped, totalPruned, totalErrors int for _, extra := range cfg.Extras { - extraSource := filepath.Join(sourceRoot, extra.Name) + extraSource := config.ExtrasSourceDir(cfg.Source, extra.Name) ui.Header(capitalize(extra.Name))