🎨 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)
|
||||
|
||||
if util.IsWorkspaceLocked(path) {
|
||||
logging.LogWarnf("skip remove workspace [%s] because it is locked", path)
|
||||
if util.IsWorkspaceLocked(path) || util.WorkspaceDir == path {
|
||||
msg := "Cannot remove current workspace"
|
||||
ret.Code = -1
|
||||
ret.Msg = msg
|
||||
ret.Data = map[string]interface{}{"closeTimeout": 3000}
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue