fix Add options "Automatic Directory Creation with Slash" #2640 - #2702
Open
asukaminato0721 wants to merge 2 commits into
Open
fix Add options "Automatic Directory Creation with Slash" #2640#2702asukaminato0721 wants to merge 2 commits into
asukaminato0721 wants to merge 2 commits into
Conversation
sinelaw
approved these changes
Jul 16, 2026
sinelaw
left a comment
Owner
There was a problem hiding this comment.
This is an autogenerated comment
- Confirms bug: master's
perform_file_explorer_renamerejects any/in new-file names, matching issue #2640. - Fix reuses the existing
FileSystem::create_dir_alltrait method (no rawstd::fs), keeps the pre-existing rename/validation flow, and adds the check only foris_new_file— minimal, non-duplicative, no architectural changes. - All 14 locale files got the new
explorer.new_item_path_must_be_relativekey; unit + e2e tests added (fail-without-fix pattern). - Interactively verified in tmux against a debug build on the PR branch:
Ctrl+N→ typedsrc/components/app.rs→ dirs auto-created, tempuntitled_*file moved into place, buffer focused on the new file.- Typed an absolute path (
/etc/passwd_evil) → rejected with "New item path must be relative", nothing created outside the project. - Typed
../outside_project/evil.txt→ allowed and escaped the project dir, matching the issue's explicit spec that./..remain literal relative components (not a regression).
- No duplicate/adjacent existing feature found.
Generated by Claude Code
Owner
|
Escaping the project dir shouldn't be allowed, e.g. we can evaluate the absolute canonical target path and check that its under the project dir |
asukaminato0721
force-pushed
the
2640
branch
2 times, most recently
from
August 2, 2026 06:24
7886457 to
e8b3655
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix #2640
New files can use nested paths such as src/components/app.rs; missing directories are created automatically.
Relative . and .. components remain supported.
Absolute, drive-prefixed, and UNC paths are rejected.
~ and $HOME remain literal—no expansion.
Filesystem and permission errors are handled without panics.
Added localized validation messages and regression coverage.