mirror of
https://github.com/zed-industries/zed.git
synced 2026-11-19 06:59:22 +01:00
bb5e6dfd07
## Summary #38744 made the empty-name check `filename.is_empty()` inside `if !filename.is_empty()`, so it never ran. Names made only of whitespace got the leading or trailing whitespace warning instead of "File or directory name cannot be empty." The check is now `filename.trim().is_empty()`. ## Testing - `test_whitespace_only_filename_is_reported_as_empty` enters spaces as a new file's name and checks for the error. It fails without the fix. - `cargo test -p project_panel` and `./script/clippy` pass. ## Self-review - [x] I've reviewed my diff for quality, security, reliability, and performance. - [x] UI changes follow the [checklist](https://zed.dev/docs/development/ui-checklist). - [x] Tests cover the new or changed behavior. Release Notes: - Fixed the project panel showing the wrong message for whitespace-only file names --------- Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>