# Fix language server renaming when parent directory does not exist \(\#43499\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 61a414df77a49278b6c734b486d7cda419cf781e

Requested commit: 61a414df77a49278b6c734b486d7cda419cf781e

Commit: 61a414df77a49278b6c734b486d7cda419cf781e

Tree: 0427f12dc27480ee0170e4ea9050ca1dd020590e

Author: Dino

Committer: GitHub

## Message

```
Fix language server renaming when parent directory does not exist (#43499)

Update the `fs::RenameOptions` used by
`project::lsp_store::LocalLspStore.deserialize_workspace_edit` in order
to always set `create_parents` to `true`. Doing this ensures that we'll
always create the folders for the new file path provided by the language
server instead of failing to handle the request in case the parent

- Introduce `create_parents` field to `fs::RenameOptions`
- Update `fs::RealFs.rename` to ensure that the `create_parents` option
is respected

Closes #41820 

Release Notes:

- Fixed a bug where using language server's file renaming actions could
fail if the parent directory of the new file did not exist
```

## Parents

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

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