Compare commits

..

2 Commits
6.0.3 ... 6.0.4

Author SHA1 Message Date
Julien Neuhart
7e69ec4367 Merge pull request #141 from thecodingmachine/merge_order
fixing merge order
2019-11-04 17:14:45 +01:00
Julien Neuhart
4623c01896 fixing merging order 2019-11-04 17:01:27 +01:00
2 changed files with 6 additions and 0 deletions

View File

@@ -2,6 +2,7 @@ package printer
import (
"context"
"sort"
"github.com/thecodingmachine/gotenberg/internal/pkg/conf"
"github.com/thecodingmachine/gotenberg/internal/pkg/xcontext"
@@ -54,6 +55,8 @@ func (p mergePrinter) Print(destination string) error {
defer cancel()
p.ctx = ctx
}
// see https://github.com/thecodingmachine/gotenberg/issues/139.
sort.Strings(p.fpaths)
p.logger.DebugfOp(op, "merging '%v'...", p.fpaths)
resolver := func() error {
var args []string

View File

@@ -5,6 +5,7 @@ import (
"fmt"
"os"
"path/filepath"
"sort"
"github.com/phayes/freeport"
"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)
defer cancel()
resolver := func() error {
// see https://github.com/thecodingmachine/gotenberg/issues/139.
sort.Strings(p.fpaths)
fpaths := make([]string, len(p.fpaths))
dirPath := filepath.Dir(destination)
for i, fpath := range p.fpaths {