Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
Daniel 2025-12-08 17:47:06 +08:00
parent 5bef3bf817
commit af823bd8fa
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -243,8 +243,10 @@ func getWorkspaces(c *gin.Context) {
var workspaces, openedWorkspaces, closedWorkspaces []*Workspace
for _, p := range workspacePaths {
logging.LogInfof("get workspace [%s]", p)
closed := !util.IsWorkspaceLocked(p)
if closed {
logging.LogInfof("workspace [%s] is closed", p)
closedWorkspaces = append(closedWorkspaces, &Workspace{Path: p, Closed: closed})
} else {
openedWorkspaces = append(openedWorkspaces, &Workspace{Path: p, Closed: closed})