# Fix case-only renaming of files \(\#7768\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 017b2db6309fc72e852193e208df2c8e6f2484ff

Requested commit: 017b2db6309fc72e852193e208df2c8e6f2484ff

Commit: 017b2db6309fc72e852193e208df2c8e6f2484ff

Tree: 84b5db31c9bd3bedd845c2f1fd1cbbe595a99d65

Author: Thorsten Ball

Committer: GitHub

## Message

```
Fix case-only renaming of files (#7768)

This fixes #5211 and #7732 by fixing the case-only file renaming.

The fix here works by checking hooking into function that produces the
data to populate the project panel.

It checks whether we're on a case-insensitive file system (default on
macOS, but you can have case-sensitive FS on macOS too) and if so, it
ignores the metadata for files for which the absolute path (returned by
the FS scanner) and canonicalized path do NOT match.

That's the case for (a) symlinks and (b) case-only renames of files.

It only does this check for case-only renames.

Release Notes:

- Fixed case-only renaming of files producing duplicate entries in
project panel.
([#5211](https://github.com/zed-industries/zed/issues/5211)).

Co-authored-by: Antonio <antonio@zed.dev>
```

## Parents

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

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