From 1a2dade5d12abcffd603a0267e29bcd9400c531a Mon Sep 17 00:00:00 2001 From: fatbob01 Date: Fri, 22 May 2026 08:38:05 -0400 Subject: [PATCH] fix(windows): remove remaining SYMLINK guards missed by #607 #607 removed the guards in symlink_creator.go and health_handlers.go but two more remained: - internal/config/manager.go: validator rejecting SYMLINK on Windows at startup - internal/health/library_sync.go: guard blocking symlink updates in library sync Remove both blocks and their now-unused runtime imports. Co-Authored-By: Claude Sonnet 4.6 --- internal/config/manager.go | 5 ----- internal/health/library_sync.go | 4 ---- 2 files changed, 9 deletions(-) diff --git a/internal/config/manager.go b/internal/config/manager.go index 067394936..098b15086 100644 --- a/internal/config/manager.go +++ b/internal/config/manager.go @@ -7,7 +7,6 @@ import ( "log/slog" "os" "path/filepath" - "runtime" "slices" "strings" "sync" @@ -542,10 +541,6 @@ func (c *Config) Validate() error { if !validStrategies[c.Import.ImportStrategy] { return fmt.Errorf("import_strategy must be one of: NONE, SYMLINK, STRM") } - if runtime.GOOS == "windows" && c.Import.ImportStrategy == ImportStrategySYMLINK { - return fmt.Errorf("import_strategy SYMLINK is not supported on Windows; use STRM instead") - } - // Validate import directory when strategy requires it if c.Import.ImportStrategy == ImportStrategySYMLINK || c.Import.ImportStrategy == ImportStrategySTRM { if c.Import.ImportDir == nil || *c.Import.ImportDir == "" { diff --git a/internal/health/library_sync.go b/internal/health/library_sync.go index b2600a282..ff71f3589 100644 --- a/internal/health/library_sync.go +++ b/internal/health/library_sync.go @@ -9,7 +9,6 @@ import ( "net/url" "os" "path/filepath" - "runtime" "sort" "strings" "sync" @@ -1185,9 +1184,6 @@ func updateSymlinkForMountChange( } // Create new symlink - if runtime.GOOS == "windows" { - return currentTarget, false, fmt.Errorf("symlinks are not supported on Windows") - } if err := os.Symlink(newTarget, symlinkPath); err != nil { slog.ErrorContext(ctx, "Failed to create updated symlink", "path", symlinkPath,