From 28474b5ff59d5061587f57c2540b540aa6f296bb Mon Sep 17 00:00:00 2001 From: Alain Borel Date: Mon, 8 Jul 2024 06:14:58 +0200 Subject: [PATCH] ensure imagelist.txt is properly ordered --- src/zotero-ocr.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/zotero-ocr.js b/src/zotero-ocr.js index 3a2a327..a1582b8 100644 --- a/src/zotero-ocr.js +++ b/src/zotero-ocr.js @@ -206,6 +206,8 @@ ZoteroOCR = { } Zotero.debug('Files are now:') Zotero.debug(imageListArray); + // IOUtils.getChildren() is not guaranteed to return files in alphanumerical order + imageListArray.sort(); // save the list of images in a separate file Zotero.File.putContents(Zotero.File.pathToFile(imageList), imageListArray.join('\n'));