panic removed

This commit is contained in:
Vyacheslav Zgordan 2020-07-14 18:29:10 +03:00
parent dadff18005
commit 61057654e3
3 changed files with 3 additions and 6 deletions

View File

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

View File

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

View File

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