mirror of
https://github.com/unidoc/unioffice.git
synced 2025-04-25 13:48:53 +08:00
panic removed
This commit is contained in:
parent
dadff18005
commit
61057654e3
@ -15,7 +15,6 @@ import (
|
||||
"image"
|
||||
"image/jpeg"
|
||||
"io"
|
||||
"log"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
@ -644,7 +643,7 @@ func Read(r io.ReaderAt, size int64) (*Document, error) {
|
||||
|
||||
tmpPath, err := tempstorage.TempDir("unioffice-docx")
|
||||
if err != nil {
|
||||
log.Fatalf("creating zip: %s", err)
|
||||
return nil, err
|
||||
}
|
||||
doc.TmpPath = tmpPath
|
||||
|
||||
|
@ -11,7 +11,6 @@ import (
|
||||
"archive/zip"
|
||||
"fmt"
|
||||
"io"
|
||||
"log"
|
||||
|
||||
"github.com/unidoc/unioffice"
|
||||
"github.com/unidoc/unioffice/common/tempstorage"
|
||||
@ -24,7 +23,7 @@ func Read(r io.ReaderAt, size int64) (*Presentation, error) {
|
||||
|
||||
tmpPath, err := tempstorage.TempDir("unioffice-pptx")
|
||||
if err != nil {
|
||||
log.Fatalf("creating zip: %s", err)
|
||||
return nil, err
|
||||
}
|
||||
doc.TmpPath = tmpPath
|
||||
|
||||
|
@ -11,7 +11,6 @@ import (
|
||||
"archive/zip"
|
||||
"fmt"
|
||||
"io"
|
||||
"log"
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
@ -26,7 +25,7 @@ func Read(r io.ReaderAt, size int64) (*Workbook, error) {
|
||||
|
||||
tmpPath, err := tempstorage.TempDir("unioffice-xlsx")
|
||||
if err != nil {
|
||||
log.Fatalf("creating zip: %s", err)
|
||||
return nil, err
|
||||
}
|
||||
wb.TmpPath = tmpPath
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user