mirror of
https://github.com/mindoc-org/mindoc.git
synced 2026-02-27 17:03:57 +08:00
修改文档底部信息,增加文档创建时间。
This commit is contained in:
@@ -272,7 +272,7 @@ func (m *BookResult) Converter(sessionId string) (ConvertBookResult, error) {
|
||||
//先将转换的文件储存到临时目录
|
||||
tempOutputPath := filepath.Join(os.TempDir(), sessionId, m.Identify, "source") //filepath.Abs(filepath.Join("cache", sessionId))
|
||||
|
||||
sourceDir := strings.TrimSuffix(tempOutputPath, "source");
|
||||
sourceDir := strings.TrimSuffix(tempOutputPath, "source")
|
||||
if filetil.FileExists(sourceDir) {
|
||||
if err := os.RemoveAll(sourceDir); err != nil {
|
||||
beego.Error("删除临时目录失败 ->", sourceDir, err)
|
||||
@@ -485,7 +485,7 @@ func (m *BookResult) Converter(sessionId string) (ConvertBookResult, error) {
|
||||
}
|
||||
beego.Info("文档转换完成:" + m.BookName)
|
||||
|
||||
if err := filetil.CopyFile(filepath.Join(eBookConverter.OutputPath, "output", "book.mobi"), mobipath, ); err != nil {
|
||||
if err := filetil.CopyFile(filepath.Join(eBookConverter.OutputPath, "output", "book.mobi"), mobipath); err != nil {
|
||||
beego.Error("复制文档失败 -> ", filepath.Join(eBookConverter.OutputPath, "output", "book.mobi"), err)
|
||||
}
|
||||
if err := filetil.CopyFile(filepath.Join(eBookConverter.OutputPath, "output", "book.pdf"), pdfpath); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user