# linux: Store binary path before restart to handle deleted binary file \(\#11568\) · gitcafe/zed

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

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

Visibility: public

Requested revision: dbebb40956259dbe6ca03333129fb65d048539f8

Requested commit: dbebb40956259dbe6ca03333129fb65d048539f8

Commit: dbebb40956259dbe6ca03333129fb65d048539f8

Tree: dd39d49126ec380cde268b7fe4faf979ab752051

Author: Thorsten Ball

Committer: GitHub

## Message

```
linux: Store binary path before restart to handle deleted binary file (#11568)

This fixes restart after updates not working on Linux.

On Linux we can't reliably get the binary path after an update, because
the original binary was deleted and the path will contain ` (deleted)`.

See: https://github.com/rust-lang/rust/issues/69343

We *could* strip ` (deleted)` off, but that feels nasty. So instead we
save the original binary path, before we do the installation, then
restart.

Later on, we can also change this to be a _new_ binary path returned by
the installers, which we then have to start.


Release Notes:

- N/A
```

## Parents

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

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