fix(server): return the correct file on multiple files with same name#234
fix(server): return the correct file on multiple files with same name#234orhun merged 2 commits intoorhun:masterfrom
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #234 +/- ##
=======================================
Coverage 70.11% 70.11%
=======================================
Files 11 11
Lines 609 609
=======================================
Hits 427 427
Misses 182 182
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
orhun
left a comment
There was a problem hiding this comment.
Such an effective fix! Can you think of any edge cases that this would break backwards compatibility?
|
I thought about it for a while and it won't break anything. But I see an issue that has nothing to do with this or the previous PRs: One can upload multiple files with the same name, but that was already possible with the |
|
I created a separate discussion #241
A bit more info: If multiple files with the same name are on the server, the file with the longest expiry timestamp will be returned when accessing the file via Previously a different file was returned. Which one is not entirely clear depending on expiration but not yet cleaned from disk, and so on. But this was never a defined behavior anyway, thus no breaking change. |
orhun
left a comment
There was a problem hiding this comment.
Thanks for looking into this and creating a discussion! I will get to that soon - I think this PR is in good shape to merge now.
Description
The
glob_match_filefunction returns the wrong entry.globyields paths in alphabetical order. We want the file with the longest expiry date/time.Motivation and Context
fixes #218
How Has This Been Tested?
Changelog Entry
Types of Changes
Checklist: