# workspace: Fix last removed folder from workspace used to reopen on Zed startup \(\#34925\) · gitcafe/zed

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

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

Visibility: public

Requested revision: e90cf0b9412b7f8fcb557d1edb2c3f586c7bd45b

Requested commit: e90cf0b9412b7f8fcb557d1edb2c3f586c7bd45b

Commit: e90cf0b9412b7f8fcb557d1edb2c3f586c7bd45b

Tree: f2a6a7e60447878236714cbbba4ff7b04e5d09dd

Author: Smit Barmase

Committer: GitHub

## Message

```
workspace: Fix last removed folder from workspace used to reopen on Zed startup (#34925)

Closes #34924

Now, when `local_paths` are empty, we detach `session_id` from that
workspace serialization item. This way, when we restore it using the
default "last_session", we don't restore this workspace back. This is
same as when we use `cmd-w` to close window, which also sets
`session_id` to `None` before serialization.

Release Notes:

- Fixed an issue where last removed folder from workspace used to reopen
on Zed startup.
```

## Parents

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

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