# Derive data directory names from APP_NAME constant \(\#55805\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 0e479e0e312c2513f75eb8dfc77bf3bb72ee2c91

Requested commit: 0e479e0e312c2513f75eb8dfc77bf3bb72ee2c91

Commit: 0e479e0e312c2513f75eb8dfc77bf3bb72ee2c91

Tree: 9c31bfef36a743a4eea5e595e0264a9b0e3a65bc

Author: Richard Feldman

Committer: GitHub

## Message

```
Derive data directory names from APP_NAME constant (#55805)

Replace all hardcoded `"Zed"` and `"zed"` directory names in
`config_dir()`, `data_dir()`, `state_dir()`, and `temp_dir()` with a
single `APP_NAME` constant in the `paths` crate.

- On macOS/Windows (native paths like Application Support, LocalAppData,
Caches), `APP_NAME` is used directly (`"Zed"`).
- On Linux/FreeBSD (XDG-style paths), `app_name_lowercase()` is used
(`"zed"`).

This ensures forks that change `APP_NAME` automatically get their own
data directories, preventing them from stomping on Zed users' databases
and config.

Release Notes:

- N/A
```

## Parents

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

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