# project: Fix empty files not downloading from a remote project \(\#51571\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/f1e7f397d798d5a64fe3df7821a9e948d94c54bf)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: f1e7f397d798d5a64fe3df7821a9e948d94c54bf

Requested commit: f1e7f397d798d5a64fe3df7821a9e948d94c54bf

Commit: f1e7f397d798d5a64fe3df7821a9e948d94c54bf

Tree: be095edccef3a09f674646bfd185d82d7ac44369

Author: Amaan

Committer: GitHub

## Message

```
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
```

## Parents

- [5b6201d2b2ecada020314ce8bc1f72607ac03e58](https://git.cafe/gitcafe/zed/commit/5b6201d2b2ecada020314ce8bc1f72607ac03e58?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/f1e7f397d798d5a64fe3df7821a9e948d94c54bf?format=markdown)
