|
@@ -112,7 +112,7 @@ func ImportSY(zipPath, boxID, toPath string) (err error) {
|
|
}
|
|
}
|
|
if 1 != len(unzipRootPaths) {
|
|
if 1 != len(unzipRootPaths) {
|
|
logging.LogErrorf("invalid .sy.zip")
|
|
logging.LogErrorf("invalid .sy.zip")
|
|
- return errors.New("invalid .sy.zip")
|
|
|
|
|
|
+ return errors.New(Conf.Language(199))
|
|
}
|
|
}
|
|
unzipRootPath := unzipRootPaths[0]
|
|
unzipRootPath := unzipRootPaths[0]
|
|
luteEngine := util.NewLute()
|
|
luteEngine := util.NewLute()
|
|
@@ -422,7 +422,7 @@ func ImportData(zipPath string) (err error) {
|
|
return errors.New("check data.zip failed")
|
|
return errors.New("check data.zip failed")
|
|
}
|
|
}
|
|
if 0 < len(files) {
|
|
if 0 < len(files) {
|
|
- return errors.New("invalid data.zip")
|
|
|
|
|
|
+ return errors.New(Conf.Language(198))
|
|
}
|
|
}
|
|
dirs, err := os.ReadDir(unzipPath)
|
|
dirs, err := os.ReadDir(unzipPath)
|
|
if nil != err {
|
|
if nil != err {
|
|
@@ -430,7 +430,7 @@ func ImportData(zipPath string) (err error) {
|
|
return errors.New("check data.zip failed")
|
|
return errors.New("check data.zip failed")
|
|
}
|
|
}
|
|
if 1 != len(dirs) {
|
|
if 1 != len(dirs) {
|
|
- return errors.New("invalid data.zip")
|
|
|
|
|
|
+ return errors.New(Conf.Language(198))
|
|
}
|
|
}
|
|
|
|
|
|
tmpDataPath := filepath.Join(unzipPath, dirs[0].Name())
|
|
tmpDataPath := filepath.Join(unzipPath, dirs[0].Name())
|