This commit is contained in:
Daniel 2024-05-17 21:58:38 +08:00
parent ad58e1c0c9
commit 8a47d44884
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -115,12 +115,13 @@ func ImportSY(zipPath, boxID, toPath string) (err error) {
return
}
if 1 != len(unzipRootPaths) {
logging.LogErrorf("invalid .sy.zip")
logging.LogErrorf("invalid .sy.zip [%v]", unzipRootPaths)
return errors.New(Conf.Language(199))
}
unzipRootPath := unzipRootPaths[0]
name := filepath.Base(unzipRootPath)
if strings.HasPrefix(name, "data-20") && len("data-20230321175442") == len(name) {
logging.LogErrorf("invalid .sy.zip [unzipRootPath=%s, baseName=%s]", unzipRootPath, name)
return errors.New(Conf.Language(199))
}