project: Fix empty files not downloading from a remote project (#51571)

- check `content_size==0`
- entry is removed from `downloading_files`
- empty file is writte via `smol::fs::write(..., &[])`

this means the receiver handles the empty files completely as soon as
the State message arrives, without ever needing a Chunk that will never
come

Closes #51551

Before you mark this PR as ready for review, make sure that you have:
- [x] Added a solid test coverage and/or screenshots from doing manual
testing
- [x] Done a self-review taking into account security and performance
aspects
- [ ] No UI CHANGES


Release Notes:
- Fixed empty files not downloading from a remote project
f1e7f397d7Amaan committed on 3/17/2026, 8:48:29 AM· committed by GitHubparent5b6201d
1 file changedLine totals unavailable