mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-03 02:59:50 +08:00
🎨 移动端删除的工作空间无法同名再次新建 https://github.com/siyuan-note/siyuan/issues/7351
This commit is contained in:
parent
c483813c05
commit
a40f954e26
@ -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…
Reference in New Issue
Block a user