🎨 改进导入 data.zip 和 .sy.zip 校验失败时的提示 Fix https://github.com/siyuan-note/siyuan/issues/7738

This commit is contained in:
Liang Ding 2023-03-21 18:55:08 +08:00
parent 3498811f48
commit d398b67065
No known key found for this signature in database
GPG key ID: 136F30F901A2231D

View file

@ -115,6 +115,11 @@ func ImportSY(zipPath, boxID, toPath string) (err error) {
return errors.New(Conf.Language(199))
}
unzipRootPath := unzipRootPaths[0]
name := filepath.Base(unzipRootPath)
if strings.HasPrefix(name, "data-20") && len("data-20230321175442") == len(name) {
return errors.New(Conf.Language(199))
}
luteEngine := util.NewLute()
blockIDs := map[string]string{}
trees := map[string]*parse.Tree{}