mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 23:20:13 +01:00
🎨 Improve remove workspace dir path https://ld246.com/article/1703151906396
This commit is contained in:
parent
d9b5110ea5
commit
2742fc369b
1 changed files with 5 additions and 2 deletions
|
|
@ -138,8 +138,11 @@ func removeWorkspaceDir(c *gin.Context) {
|
||||||
|
|
||||||
path := arg["path"].(string)
|
path := arg["path"].(string)
|
||||||
|
|
||||||
if util.IsWorkspaceLocked(path) {
|
if util.IsWorkspaceLocked(path) || util.WorkspaceDir == path {
|
||||||
logging.LogWarnf("skip remove workspace [%s] because it is locked", path)
|
msg := "Cannot remove current workspace"
|
||||||
|
ret.Code = -1
|
||||||
|
ret.Msg = msg
|
||||||
|
ret.Data = map[string]interface{}{"closeTimeout": 3000}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue