🎨 Support opening assets through other apps on HarmonyOS NEXT https://github.com/siyuan-note/siyuan/issues/15691

This commit is contained in:
Daniel 2025-08-27 11:25:20 +08:00
parent 1bc68efd3a
commit 174a7befbe
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -93,18 +93,18 @@ func SetHttpServerPort(port int) {
}
//export GetCurrentWorkspacePath
func GetCurrentWorkspacePath() string {
return util.WorkspaceDir
func GetCurrentWorkspacePath() *C.char {
return C.CString(util.WorkspaceDir)
}
//export GetAssetAbsPath
func GetAssetAbsPath(asset string) (ret string) {
ret, err := model.GetAssetAbsPath(asset)
if err != nil {
logging.LogErrorf("get asset [%s] abs path failed: %s", asset, err)
ret = asset
func GetAssetAbsPath(relativePath *C.char) *C.char {
absPath, err := model.GetAssetAbsPath(C.GoString(relativePath))
if nil != err {
logging.LogErrorf("get asset abs path failed: %s", err)
return relativePath
}
return
return C.CString(absPath)
}
//export GetMimeTypeByExt