mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🎨 When New document save location is configured as /, it will be completed as /Untitled https://github.com/siyuan-note/siyuan/issues/10305
This commit is contained in:
parent
2b37ea5d06
commit
3dc93ff409
4 changed files with 12 additions and 0 deletions
|
|
@ -612,6 +612,9 @@ func getDocCreateSavePath(c *gin.Context) {
|
|||
if "../" == docCreateSavePathTpl {
|
||||
docCreateSavePathTpl = "../Untitled"
|
||||
}
|
||||
if "/" == docCreateSavePathTpl {
|
||||
docCreateSavePathTpl = "/Untitled"
|
||||
}
|
||||
|
||||
p, err := model.RenderGoTemplate(docCreateSavePathTpl)
|
||||
if nil != err {
|
||||
|
|
|
|||
|
|
@ -329,6 +329,9 @@ func setNotebookConf(c *gin.Context) {
|
|||
if "../" == boxConf.DocCreateSavePath {
|
||||
boxConf.DocCreateSavePath = "../Untitled"
|
||||
}
|
||||
if "/" == boxConf.DocCreateSavePath {
|
||||
boxConf.DocCreateSavePath = "/Untitled"
|
||||
}
|
||||
|
||||
box.SaveConf(boxConf)
|
||||
ret.Data = boxConf
|
||||
|
|
|
|||
|
|
@ -398,6 +398,9 @@ func setFiletree(c *gin.Context) {
|
|||
if "../" == fileTree.DocCreateSavePath {
|
||||
fileTree.DocCreateSavePath = "../Untitled"
|
||||
}
|
||||
if "/" == fileTree.DocCreateSavePath {
|
||||
fileTree.DocCreateSavePath = "/Untitled"
|
||||
}
|
||||
|
||||
if 1 > fileTree.MaxOpenTabCount {
|
||||
fileTree.MaxOpenTabCount = 8
|
||||
|
|
|
|||
|
|
@ -208,6 +208,9 @@ func InitConf() {
|
|||
if "../" == Conf.FileTree.DocCreateSavePath {
|
||||
Conf.FileTree.DocCreateSavePath = "../Untitled"
|
||||
}
|
||||
if "/" == Conf.FileTree.DocCreateSavePath {
|
||||
Conf.FileTree.DocCreateSavePath = "/Untitled"
|
||||
}
|
||||
util.UseSingleLineSave = Conf.FileTree.UseSingleLineSave
|
||||
|
||||
util.CurrentCloudRegion = Conf.CloudRegion
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue