mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-09-22 08:30:42 +02:00
🎨 移动端删除的工作空间无法同名再次新建 https://github.com/siyuan-note/siyuan/issues/7351
This commit is contained in:
parent
c483813c05
commit
a40f954e26
1 changed files with 6 additions and 10 deletions
|
@ -52,16 +52,12 @@ func createWorkspaceDir(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
if gulu.File.IsExist(absPath) {
|
||||
ret.Code = -1
|
||||
ret.Msg = model.Conf.Language(78)
|
||||
return
|
||||
}
|
||||
|
||||
if err := os.MkdirAll(absPath, 0755); nil != err {
|
||||
ret.Code = -1
|
||||
ret.Msg = fmt.Sprintf("create workspace dir [%s] failed: %s", absPath, err)
|
||||
return
|
||||
if !gulu.File.IsExist(absPath) {
|
||||
if err := os.MkdirAll(absPath, 0755); nil != err {
|
||||
ret.Code = -1
|
||||
ret.Msg = fmt.Sprintf("create workspace dir [%s] failed: %s", absPath, err)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
workspacePaths, err := util.ReadWorkspacePaths()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue