refactor(store): clone cached orphan slice
Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
parent
dd4c9a2585
commit
85bef185e8
1 changed files with 1 additions and 1 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue