# project: Fix inability to open file after save as \(\#41012\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 0ee6ca1767bf45e1921a4c085e5b7cbcfe3620e0

Requested commit: 0ee6ca1767bf45e1921a4c085e5b7cbcfe3620e0

Commit: 0ee6ca1767bf45e1921a4c085e5b7cbcfe3620e0

Tree: cf6b38c1263719482fc3169a76a75b9bd7323720

Author: Dino

Committer: GitHub

## Message

```
project: Fix inability to open file after save as (#41012)

Update `project::buffer_store::BufferStore.save_buffer_as` in order to
correctly update the `path_to_buffer_id` hash map, ensuring that the
currently open file's path is dissociated from the buffer's id, to
prevent the new buffer from being open when trying to open the original
file.

Closes #29783 

Release Notes:

- Fixed issue where using `workspace: save as` would prevent users from
opening the original file from which the new file was created

---------

Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
```

## Parents

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

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