Skip to content

Commit

Permalink
ensure imagelist.txt is properly ordered
Browse files Browse the repository at this point in the history
  • Loading branch information
madturtles committed Jul 8, 2024
1 parent 83c1f33 commit 28474b5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/zotero-ocr.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
Expand Down

0 comments on commit 28474b5

Please sign in to comment.