mirror of
https://github.com/gotenberg/gotenberg.git
synced 2026-08-13 02:42:14 +01:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7e69ec4367 | ||
|
|
4623c01896 |
@@ -2,6 +2,7 @@ package printer
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"sort"
|
||||||
|
|
||||||
"github.com/thecodingmachine/gotenberg/internal/pkg/conf"
|
"github.com/thecodingmachine/gotenberg/internal/pkg/conf"
|
||||||
"github.com/thecodingmachine/gotenberg/internal/pkg/xcontext"
|
"github.com/thecodingmachine/gotenberg/internal/pkg/xcontext"
|
||||||
@@ -54,6 +55,8 @@ func (p mergePrinter) Print(destination string) error {
|
|||||||
defer cancel()
|
defer cancel()
|
||||||
p.ctx = ctx
|
p.ctx = ctx
|
||||||
}
|
}
|
||||||
|
// see https://github.com/thecodingmachine/gotenberg/issues/139.
|
||||||
|
sort.Strings(p.fpaths)
|
||||||
p.logger.DebugfOp(op, "merging '%v'...", p.fpaths)
|
p.logger.DebugfOp(op, "merging '%v'...", p.fpaths)
|
||||||
resolver := func() error {
|
resolver := func() error {
|
||||||
var args []string
|
var args []string
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
"sort"
|
||||||
|
|
||||||
"github.com/phayes/freeport"
|
"github.com/phayes/freeport"
|
||||||
"github.com/thecodingmachine/gotenberg/internal/pkg/conf"
|
"github.com/thecodingmachine/gotenberg/internal/pkg/conf"
|
||||||
@@ -53,6 +54,8 @@ func (p officePrinter) Print(destination string) error {
|
|||||||
ctx, cancel := xcontext.WithTimeout(p.logger, p.opts.WaitTimeout)
|
ctx, cancel := xcontext.WithTimeout(p.logger, p.opts.WaitTimeout)
|
||||||
defer cancel()
|
defer cancel()
|
||||||
resolver := func() error {
|
resolver := func() error {
|
||||||
|
// see https://github.com/thecodingmachine/gotenberg/issues/139.
|
||||||
|
sort.Strings(p.fpaths)
|
||||||
fpaths := make([]string, len(p.fpaths))
|
fpaths := make([]string, len(p.fpaths))
|
||||||
dirPath := filepath.Dir(destination)
|
dirPath := filepath.Dir(destination)
|
||||||
for i, fpath := range p.fpaths {
|
for i, fpath := range p.fpaths {
|
||||||
|
|||||||
Reference in New Issue
Block a user