Explorar o código

:art: Add logging https://github.com/siyuan-note/siyuan/issues/11447

Daniel hai 1 ano
pai
achega
8a47d44884
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      kernel/model/import.go

+ 2 - 1
kernel/model/import.go

@@ -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))
 	}