mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-09-22 00:20:47 +02:00
🎨 Support opening assets through other apps on HarmonyOS NEXT https://github.com/siyuan-note/siyuan/issues/15691
This commit is contained in:
parent
1bc68efd3a
commit
174a7befbe
1 changed files with 8 additions and 8 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue