Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanessa219 committed Jun 12, 2024
2 parents e22ac77 + f51b337 commit c342c06
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 5 deletions.
2 changes: 1 addition & 1 deletion kernel/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require (
github.com/88250/clipboard v0.1.5
github.com/88250/epub v0.0.0-20230830085737-c19055cd1f48
github.com/88250/go-humanize v0.0.0-20240424102817-4f78fac47ea7
github.com/88250/gulu v1.2.3-0.20240612021457-b8e8cadd87f3
github.com/88250/gulu v1.2.3-0.20240612035750-c9cf5f7a4d02
github.com/88250/lute v1.7.7-0.20240611024745-53a7d0cc6568
github.com/88250/pdfcpu v0.3.14-0.20230401044135-c7369a99720c
github.com/88250/vitess-sqlparser v0.0.0-20210205111146-56a2ded2aba1
Expand Down
4 changes: 2 additions & 2 deletions kernel/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ github.com/88250/go-humanize v0.0.0-20240424102817-4f78fac47ea7 h1:MafIFwSS0x6A4
github.com/88250/go-humanize v0.0.0-20240424102817-4f78fac47ea7/go.mod h1:HrKCCTin3YNDSLBD02K0AOljjV6eNwc3/zyEI+xyV1I=
github.com/88250/go-sqlite3 v1.14.13-0.20231214121541-e7f54c482950 h1:Pa5hMiBceTVVqrYaDlLio2QSKbXMUmAZPbzCwT5eNCw=
github.com/88250/go-sqlite3 v1.14.13-0.20231214121541-e7f54c482950/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
github.com/88250/gulu v1.2.3-0.20240612021457-b8e8cadd87f3 h1:vgVJ0e9hrdEpHOkKcSe45+ht1+O13PWi2ssq8yDVAvQ=
github.com/88250/gulu v1.2.3-0.20240612021457-b8e8cadd87f3/go.mod h1:MUfzyfmbPrRDZLqxc7aPrVYveatTHRfoUa5TynPS0i8=
github.com/88250/gulu v1.2.3-0.20240612035750-c9cf5f7a4d02 h1:3e5+yobj655pTeKOYMbJrnc1mE51ZkbXIxquTYZuYCY=
github.com/88250/gulu v1.2.3-0.20240612035750-c9cf5f7a4d02/go.mod h1:MUfzyfmbPrRDZLqxc7aPrVYveatTHRfoUa5TynPS0i8=
github.com/88250/lute v1.7.7-0.20240611024745-53a7d0cc6568 h1:1TwBQATNCmPi4XvEZReYDam8aouz3DZPXUciciTITdg=
github.com/88250/lute v1.7.7-0.20240611024745-53a7d0cc6568/go.mod h1:VDAzL8b+oCh+e3NAlmwwLzC53ten0rZlS8NboB7ljtk=
github.com/88250/pdfcpu v0.3.14-0.20230401044135-c7369a99720c h1:Dl/8S9iLyPMTElnWIBxmjaLiWrkI5P4a21ivwAn5pU0=
Expand Down
20 changes: 18 additions & 2 deletions kernel/model/export.go
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,12 @@ func exportData(exportFolder string) (zipPath string, err error) {
return
}

if err = zip.AddDirectory(baseFolderName, exportFolder); nil != err {
zipCallback := func(filename string) {
msg := Conf.language(65) + " " + fmt.Sprintf(Conf.language(70), filename)
util.PushEndlessProgress(msg)
}

if err = zip.AddDirectory(baseFolderName, exportFolder, zipCallback); nil != err {
logging.LogErrorf("create export data zip [%s] failed: %s", exportFolder, err)
return
}
Expand Down Expand Up @@ -1462,6 +1467,9 @@ func yfm(docIAL map[string]string) string {
}

func exportBoxSYZip(boxID string) (zipPath string) {
util.PushEndlessProgress(Conf.Language(65))
defer util.ClearPushProgress(100)

box := Conf.Box(boxID)
if nil == box {
logging.LogErrorf("not found box [%s]", boxID)
Expand Down Expand Up @@ -1607,6 +1615,9 @@ func exportSYZip(boxID, rootDirPath, baseFolderName string, docPaths []string) (
}

copiedAssets.Add(asset)

msg := Conf.language(65) + " " + fmt.Sprintf(Conf.language(70), asset)
util.PushEndlessProgress(msg)
}
}

Expand Down Expand Up @@ -1738,7 +1749,12 @@ func exportSYZip(boxID, rootDirPath, baseFolderName string, docPaths []string) (
return ""
}

if err = zip.AddDirectory(baseFolderName, exportFolder); nil != err {
zipCallback := func(filename string) {
msg := Conf.language(65) + " " + fmt.Sprintf(Conf.language(70), filename)
util.PushEndlessProgress(msg)
}

if err = zip.AddDirectory(baseFolderName, exportFolder, zipCallback); nil != err {
logging.LogErrorf("create export .sy.zip [%s] failed: %s", exportFolder, err)
return ""
}
Expand Down

0 comments on commit c342c06

Please sign in to comment.