🐛 Related PDF annotation information is not exported when exporting .sy.zip Fix https://github.com/siyuan-note/siyuan/issues/7836

This commit is contained in:
Liang Ding 2023-03-31 10:36:50 +08:00
parent dd5d975381
commit fba4141e27
No known key found for this signature in database
GPG key ID: 136F30F901A2231D

View file

@ -1357,6 +1357,16 @@ func exportSYZip(boxID, rootDirPath, baseFolderName string, docPaths []string) (
continue
}
if !gulu.File.IsDir(srcPath) && strings.HasSuffix(strings.ToLower(srcPath), ".pdf") {
sya := srcPath + ".sya"
if gulu.File.IsExist(sya) {
// Related PDF annotation information is not exported when exporting .sy.zip https://github.com/siyuan-note/siyuan/issues/7836
if syaErr := filelock.Copy(sya, destPath+".sya"); nil != syaErr {
logging.LogErrorf("copy sya from [%s] to [%s] failed: %s", sya, destPath+".sya", syaErr)
}
}
}
copiedAssets.Add(asset)
}
}