Browse Source

Merge remote-tracking branch 'origin/dev' into dev

Vanessa 1 year ago
parent
commit
1c9594be8e
1 changed files with 10 additions and 0 deletions
  1. 10 0
      kernel/mobile/kernel.go

+ 10 - 0
kernel/mobile/kernel.go

@@ -24,6 +24,7 @@ import (
 	"time"
 
 	"github.com/siyuan-note/filelock"
+	"github.com/siyuan-note/logging"
 	"github.com/siyuan-note/siyuan/kernel/cache"
 	"github.com/siyuan-note/siyuan/kernel/job"
 	"github.com/siyuan-note/siyuan/kernel/model"
@@ -89,6 +90,15 @@ func GetCurrentWorkspacePath() string {
 	return util.WorkspaceDir
 }
 
+func GetAssetAbsPath(asset string) (ret string) {
+	ret, err := model.GetAssetAbsPath(asset)
+	if nil != err {
+		logging.LogErrorf("get asset [%s] abs path failed: %s", asset, err)
+		ret = asset
+	}
+	return
+}
+
 func SetTimezone(container, appDir, timezoneID string) {
 	if "ios" == container {
 		os.Setenv("ZONEINFO", filepath.Join(appDir, "app", "zoneinfo.zip"))