This commit is contained in:
Liang Ding 2022-09-01 22:26:17 +08:00
parent b79bc50b44
commit 7d39c6447e
No known key found for this signature in database
GPG key ID: 136F30F901A2231D

View file

@ -127,7 +127,7 @@ func ImportSY(zipPath, boxID, toPath string) (err error) {
if ast.NodeBlockRefID == n.Type {
newDefID := blockIDs[n.TokensStr()]
if "" != newDefID {
n.Tokens = gulu.Str.ToBytes(newDefID)
n.Tokens = []byte(newDefID)
} else {
logging.LogWarnf("not found def [" + n.TokensStr() + "]")
}
@ -486,7 +486,7 @@ func ImportFromLocalPath(boxID, localPath string, toPath string) (err error) {
} else {
name = existName
}
n.Tokens = gulu.Str.ToBytes("assets/" + name)
n.Tokens = []byte("assets/" + name)
}
return ast.WalkContinue
})
@ -570,7 +570,7 @@ func ImportFromLocalPath(boxID, localPath string, toPath string) (err error) {
logging.LogErrorf("copy asset from [%s] to [%s] failed: %s", absolutePath, assetTargetPath, err)
return ast.WalkContinue
}
n.Tokens = gulu.Str.ToBytes("assets/" + name)
n.Tokens = []byte("assets/" + name)
}
return ast.WalkContinue
})