Skip to content

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

:bug: 剔除 `新建文档存放位置` 参数结尾的 `/` Fix https://github.com/siyuan-note/siyuan/issues/7315

Liang Ding3f0dd873fbaf
diff --git a/kernel/api/setting.go b/kernel/api/setting.go
index 78f26b1fb1..45c05fc168 100644
--- a/kernel/api/setting.go
+++ b/kernel/api/setting.go
@@ -168,6 +168,12 @@ func setFiletree(c *gin.Context) {
}
}
+ fileTree.DocCreateSavePath = strings.TrimSpace(fileTree.DocCreateSavePath)
+ for strings.HasSuffix(fileTree.DocCreateSavePath, "/") {
+ fileTree.DocCreateSavePath = strings.TrimSuffix(fileTree.DocCreateSavePath, "/")
+ fileTree.DocCreateSavePath = strings.TrimSpace(fileTree.DocCreateSavePath)
+ }
+
if 1 > fileTree.MaxOpenTabCount {
fileTree.MaxOpenTabCount = 8
}