-
Notifications
You must be signed in to change notification settings - Fork 0
Description
findDocuments method in DocumentFinder.php uses readdir, this function does not sort but instead reads the dir as the files were stored. This is fine if we are looking for multiple files as then we can sort them later. But, if we use findOneBy(), it randomly picks the last modified file, which is not good. We can use scandir instead so we have sorting of files before we run through them.
######## Issue imported from Gitea ########
Details
Gitea Issue ID : 550
State : open
Created : 2024-05-15T21:42:53+10:00
Issue Description
findDocuments method in DocumentFinder.php uses readdir, this function does not sort but instead reads the dir as the files were stored. This is fine if we are looking for multiple files as then we can sort them later. But, if we use findOneBy(), it randomly picks the last modified file, which is not good. We can use scandir instead so we have sorting of files before we run through them.
Timeline
Label : Added P4 on 2024-05-15T21:42:53+10:00.
Label : Added Needs Further Investigation on 2024-05-15T21:42:53+10:00.