Fix data loss when project settings opened with ".zed" in `file_scan_exclusions` (#29578)

Closes #28640

Before creating an entry for a file opened with `open_local_file`, make
sure it doesn't exist, in addition to checking that it isn't already
tracked in the workspace

Release Notes:

- Fixed an issue where the project settings file would be truncated when
opened with `zed: open project settings` if the ".zed" directory was
excluded from the files scanned in a workspace (in
"file_scan_exclusions")
3a212e72a4Ben Kunkle committed on 4/29/2025, 2:25:40 AM· committed by GitHubparent4dc8ce8
1 file changedLine totals unavailable