mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 23:20:13 +01:00
🎨 Improve exit
Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
parent
a4fb57a360
commit
ad48451d51
2 changed files with 1 additions and 6 deletions
|
|
@ -238,18 +238,13 @@ func getWorkspaces(c *gin.Context) {
|
||||||
model.RoleAdministrator,
|
model.RoleAdministrator,
|
||||||
}) {
|
}) {
|
||||||
ret.Data = []*Workspace{}
|
ret.Data = []*Workspace{}
|
||||||
logging.LogInfof("non-admin user tried to get workspaces")
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
logging.LogInfof("workspace paths [%+v]", workspacePaths)
|
|
||||||
|
|
||||||
var workspaces, openedWorkspaces, closedWorkspaces []*Workspace
|
var workspaces, openedWorkspaces, closedWorkspaces []*Workspace
|
||||||
for _, p := range workspacePaths {
|
for _, p := range workspacePaths {
|
||||||
logging.LogInfof("get workspace [%s]", p)
|
|
||||||
closed := !util.IsWorkspaceLocked(p)
|
closed := !util.IsWorkspaceLocked(p)
|
||||||
if closed {
|
if closed {
|
||||||
logging.LogInfof("workspace [%s] is closed", p)
|
|
||||||
closedWorkspaces = append(closedWorkspaces, &Workspace{Path: p, Closed: closed})
|
closedWorkspaces = append(closedWorkspaces, &Workspace{Path: p, Closed: closed})
|
||||||
} else {
|
} else {
|
||||||
openedWorkspaces = append(openedWorkspaces, &Workspace{Path: p, Closed: closed})
|
openedWorkspaces = append(openedWorkspaces, &Workspace{Path: p, Closed: closed})
|
||||||
|
|
|
||||||
|
|
@ -750,7 +750,7 @@ func Close(force, setCurrentWorkspace bool, execInstallPkg int) (exitCode int) {
|
||||||
}
|
}
|
||||||
util.HttpServing = false
|
util.HttpServing = false
|
||||||
|
|
||||||
if util.ContainerAndroid == util.Container || util.ContainerIOS == util.Container {
|
if util.ContainerAndroid == util.Container || util.ContainerIOS == util.Container || util.ContainerHarmony == util.Container {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue