Parker Loflin
bb5e6dfd07
project_panel: Show the empty-name error for whitespace-only names ( #67125 )
...
## 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 >
2026-11-18 05:53:08 +00:00
..
2026-11-14 22:52:04 +00:00
2026-11-02 15:26:50 +00:00
2026-11-17 07:17:22 +00:00
2026-11-14 22:52:04 +00:00
2026-11-06 19:51:13 +00:00
2026-11-16 19:20:21 +00:00
2026-11-10 13:34:40 +00:00
2026-11-16 13:07:38 +00:00
2026-10-29 09:12:10 +00:00
2026-11-13 11:45:35 +00:00
2026-11-03 21:30:48 +00:00
2026-11-11 19:41:39 +00:00
2026-11-10 09:43:33 +00:00
2026-11-03 22:49:20 +00:00
2026-11-05 10:31:08 +00:00
2026-11-13 11:45:35 +00:00
2026-11-13 11:45:35 +00:00
2026-11-10 13:34:40 +00:00
2026-11-16 13:07:38 +00:00
2026-11-02 17:27:20 +00:00
2026-11-02 12:45:55 +00:00
2026-11-13 11:45:35 +00:00
2026-11-13 11:45:35 +00:00
2026-11-13 11:45:35 +00:00
2026-10-29 09:12:10 +00:00
2026-11-16 13:07:38 +00:00
2026-11-13 11:45:35 +00:00
2026-11-13 11:45:35 +00:00
2026-11-03 09:14:29 +00:00
2026-11-17 20:57:13 +00:00
2026-10-29 09:12:10 +00:00
2026-11-13 11:45:35 +00:00
2026-11-02 15:26:50 +00:00
2026-11-13 11:45:35 +00:00
2026-11-06 08:04:15 +00:00
2026-11-13 11:45:35 +00:00
2026-11-14 19:33:53 +00:00
2026-11-09 12:08:31 +00:00
2026-11-10 09:43:33 +00:00
2026-11-12 00:08:05 +00:00
2026-11-16 16:42:28 +00:00
2026-10-29 09:12:10 +00:00
2026-11-15 09:13:12 +00:00
2026-11-15 09:13:12 +00:00
2026-11-18 00:29:57 +00:00
2026-10-30 09:59:44 +00:00
2026-11-17 14:26:43 +00:00
2026-11-13 11:45:35 +00:00
2026-10-28 21:52:54 +00:00
2026-11-17 13:00:41 +00:00
2026-11-14 11:34:19 +00:00
2026-11-15 05:20:14 +00:00
2026-11-13 11:45:35 +00:00
2026-11-13 19:46:43 +00:00
2026-11-13 19:46:43 +00:00
2026-11-13 16:33:49 +00:00
2026-11-10 23:00:03 +00:00
2026-11-16 17:34:29 +00:00
2026-11-15 05:20:14 +00:00
2026-11-15 05:20:14 +00:00
2026-11-12 22:39:26 +00:00
2026-11-02 15:51:56 +00:00
2026-11-17 12:43:21 +00:00
2026-11-09 11:01:36 +00:00
2026-11-13 11:45:35 +00:00
2026-11-15 22:49:03 +00:00
2026-11-13 11:45:35 +00:00
2026-11-16 13:07:38 +00:00
2026-11-16 13:07:38 +00:00
2026-11-17 13:00:41 +00:00
2026-11-17 13:00:41 +00:00
2026-11-13 11:45:35 +00:00
2026-11-13 12:27:17 +00:00
2026-11-13 11:45:35 +00:00
2026-11-13 11:45:35 +00:00
2026-11-07 09:46:58 +00:00
2026-11-12 14:52:36 +00:00
2026-11-11 19:08:16 +00:00
2026-11-13 11:45:35 +00:00
2026-10-29 14:33:41 +00:00
2026-11-17 12:52:39 +00:00
2026-11-16 13:07:38 +00:00
2026-11-09 12:08:31 +00:00
2026-11-04 14:02:53 +00:00
2026-11-13 11:45:35 +00:00
2026-11-18 00:35:29 +00:00
2026-11-09 12:26:10 +00:00
2026-11-09 12:26:10 +00:00
2026-11-11 19:41:02 +00:00
2026-11-17 17:40:00 +00:00
2026-10-29 09:12:10 +00:00
2026-11-10 13:34:40 +00:00
2026-11-18 05:53:08 +00:00
2026-11-14 11:34:22 +00:00
2026-11-12 21:00:35 +00:00
2026-11-13 11:45:35 +00:00
2026-11-11 21:17:08 +00:00
2026-11-10 13:38:24 +00:00
2026-11-17 12:43:21 +00:00
2026-11-17 12:43:21 +00:00
2026-10-29 09:12:10 +00:00
2026-10-29 09:12:10 +00:00
2026-10-30 12:27:35 +00:00
2026-11-06 14:35:38 +00:00
2026-11-16 10:41:11 +00:00
2026-11-13 11:45:35 +00:00
2026-11-16 14:20:13 +00:00
2026-11-10 23:30:25 +00:00
2026-11-10 13:34:40 +00:00
2026-11-08 20:08:14 +00:00
2026-11-04 15:54:12 +00:00
2026-11-12 14:53:04 +00:00
2026-11-10 09:43:33 +00:00
2026-11-12 15:11:54 +00:00
2026-11-16 13:48:28 +00:00
2026-11-13 11:45:35 +00:00
2026-10-29 09:12:10 +00:00
2026-11-02 22:26:26 +00:00
2026-11-13 11:45:35 +00:00
2026-11-13 16:33:49 +00:00
2026-11-16 00:05:19 +00:00
2026-11-17 16:48:24 +00:00
2026-11-13 11:45:35 +00:00
2026-11-13 05:28:29 +00:00
2026-11-16 10:57:46 +00:00
2026-11-17 19:53:23 +00:00
2026-10-29 09:12:10 +00:00
2026-11-17 12:43:21 +00:00
2026-11-13 11:45:35 +00:00
2026-11-16 13:58:55 +00:00
2026-11-13 11:45:35 +00:00