Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: Improve create workspace interaction https://github.com/siyuan-note/siyuan/issues/8700

Daniela9ad14352134
diff --git a/kernel/api/workspace.go b/kernel/api/workspace.go
index 09a4dfaa6a..3a5df4f71c 100644
--- a/kernel/api/workspace.go
+++ b/kernel/api/workspace.go
@@ -64,8 +64,16 @@ func checkWorkspaceDir(c *gin.Context) {
var existsConf, existsData bool
for _, entry := range entries {
- existsConf = "conf" == entry.Name() && entry.IsDir()
- existsData = "data" == entry.Name() && entry.IsDir()
+ if !existsConf {
+ existsConf = "conf" == entry.Name() && entry.IsDir()
+ }
+ if !existsData {
+ existsData = "data" == entry.Name() && entry.IsDir()
+ }
+
+ if existsConf && existsData {
+ break
+ }
}
if existsConf {