mirror of
https://github.com/icereed/paperless-gpt.git
synced 2025-03-12 21:08:00 -05:00
fix: Put OCR pages into correct order (#38)
A race condition caused the pages to be in a mixed order.
This commit is contained in:
parent
2d13913b3a
commit
def89b5aea
1 changed files with 4 additions and 0 deletions
|
@ -11,6 +11,7 @@ import (
|
|||
"net/http"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"slices"
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
|
@ -411,6 +412,9 @@ func (c *PaperlessClient) DownloadDocumentAsImages(ctx context.Context, document
|
|||
return nil, err
|
||||
}
|
||||
|
||||
// sort the image paths to ensure they are in order
|
||||
slices.Sort(imagePaths)
|
||||
|
||||
return imagePaths, nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue