From 85bef185e802f4d84f646db6b46ed327198ffba1 Mon Sep 17 00:00:00 2001 From: Virgil Date: Sat, 4 Apr 2026 13:07:36 +0000 Subject: [PATCH] refactor(store): clone cached orphan slice Co-Authored-By: Virgil --- workspace.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workspace.go b/workspace.go index 1069ea5..f868033 100644 --- a/workspace.go +++ b/workspace.go @@ -231,7 +231,7 @@ func (storeInstance *Store) RecoverOrphans(stateDirectory string) []*Workspace { if stateDirectory == normaliseWorkspaceStateDirectory(defaultWorkspaceStateDirectory) { storeInstance.orphanWorkspacesLock.Lock() - cachedWorkspaces := storeInstance.orphanWorkspaces + cachedWorkspaces := slices.Clone(storeInstance.orphanWorkspaces) storeInstance.orphanWorkspaces = nil storeInstance.orphanWorkspacesLock.Unlock() if len(cachedWorkspaces) > 0 {