Skip to content

fix(upload): read all entries of dropped folders - #1748

Merged
skjnldsv merged 2 commits into
mainfrom
fix/drop
Sep 17, 2026
Merged

skjnldsv merged 2 commits into
mainfrom
fix/drop

Conversation

@susnux

@susnux susnux commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Summary

readEntries() was only called once, but Chromium returns at most 100 entries per call, so folders with more entries silently lost files.

The FileSystemEntry guards additionally used instanceof, which never matches in Chromium as it does not expose those legacy interfaces as globals, so dropped folders were treated as plain files altogether.

Solution

Call readEntries() until it returns an empty array, and detect entries by their shape instead of instanceof.

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

`readEntries()` was only called once, but Chromium returns at most 100
entries per call, so folders with more entries silently lost files.
The `FileSystemEntry` guards additionally used `instanceof`, which never
matches in Chromium as it does not expose those legacy interfaces as
globals, so dropped folders were treated as plain files altogether.

Call `readEntries()` until it returns an empty array, and detect entries
by their shape instead of `instanceof`.

Assisted-by: ClaudeCode:claude-opus-5
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
@susnux susnux added type: bug 🐛 Something isn't working 3. to review 3️⃣ Waiting for reviews labels Sep 16, 2026
@susnux
susnux requested a review from skjnldsv September 16, 2026 20:47
@codecov

codecov Bot commented Sep 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.04%. Comparing base (2e56052) to head (a087e27).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1748      +/-   ##
==========================================
+ Coverage   87.95%   89.04%   +1.09%     
==========================================
  Files          44       44              
  Lines        1129     1132       +3     
  Branches      281      284       +3     
==========================================
+ Hits          993     1008      +15     
+ Misses        101       92       -9     
+ Partials       35       32       -3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
@skjnldsv
skjnldsv merged commit 0fd806c into main Sep 17, 2026
13 checks passed
@skjnldsv
skjnldsv deleted the fix/drop branch September 17, 2026 05:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review 3️⃣ Waiting for reviews type: bug 🐛 Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants