Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FF: Document finder reads directory randomly #486

Open
oyeaussie opened this issue Jul 6, 2024 · 0 comments
Open

FF: Document finder reads directory randomly #486

oyeaussie opened this issue Jul 6, 2024 · 0 comments
Assignees
Labels
Needs Further Investigation Get ready for sleepless nights, unlimited coffee to find issue was a missing comma P4 To please someone or myself I have opened this issue. Will be fixed before boomers go extinct
Milestone

Comments

@oyeaussie
Copy link
Contributor

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.

@oyeaussie oyeaussie added Needs Further Investigation Get ready for sleepless nights, unlimited coffee to find issue was a missing comma P4 To please someone or myself I have opened this issue. Will be fixed before boomers go extinct labels Jul 6, 2024
@oyeaussie oyeaussie self-assigned this Jul 6, 2024
@oyeaussie oyeaussie added this to the 0.0.0-rc.6 milestone Jul 7, 2024
@oyeaussie oyeaussie modified the milestones: 0.0.0-rc.6, 0.0.0-rc.7 Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Further Investigation Get ready for sleepless nights, unlimited coffee to find issue was a missing comma P4 To please someone or myself I have opened this issue. Will be fixed before boomers go extinct
Projects
None yet
Development

No branches or pull requests

1 participant