From 4cc544f7b5c97d34cb330195663e2ebc4be2f22d Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Thu, 6 Apr 2023 21:58:46 +0800 Subject: [PATCH] :art: Show "What's News" after upgrading https://github.com/siyuan-note/siyuan/issues/7902 --- kernel/api/system.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/kernel/api/system.go b/kernel/api/system.go index dd3da5530..02846f0a0 100644 --- a/kernel/api/system.go +++ b/kernel/api/system.go @@ -50,10 +50,14 @@ func getChangelog(c *gin.Context) { return } - changelogPath := filepath.Join(changelogsDir, "v"+util.Ver+".md") + changelogPath := filepath.Join(changelogsDir, "v"+util.Ver+model.Conf.Lang+".md") + if !gulu.File.IsExist(changelogPath) { - logging.LogWarnf("changelog not found: %s", changelogPath) - return + changelogPath = filepath.Join(changelogsDir, "v"+util.Ver+".md") + if !gulu.File.IsExist(changelogPath) { + logging.LogWarnf("changelog not found: %s", changelogPath) + return + } } contentData, err := os.ReadFile(changelogPath)