Skip to content

go up from a path that ends in a separator - #405

Open
SashaMIT wants to merge 1 commit into
0xSero:mainfrom
SashaMIT:fix/parent-trailing-separator
Open

SashaMIT wants to merge 1 commit into
0xSero:mainfrom
SashaMIT:fix/parent-trailing-separator

Conversation

@SashaMIT

@SashaMIT SashaMIT commented Oct 3, 2026 •

Copy link
Copy Markdown

Summary

RemotePath::parent of /home/user/ returned /home/user. The trailing separator was counted as a directory level, so one step up stayed in the same directory. /home/ returned /home. C:\Users\ returned C:\Users. C:\Users\npace\ returned C:\Users\npace.

The directory picker uses this for the up action. A trailing separator is not a level. /home/user/ is now /home. /home/ is now /. C:\Users\ is now C:\. C:\Users\npace\ is now C:\Users. /home/user is still /home. C:\Users\npace is still C:\Users. C:\ is still C:\.

Test plan

  • parent_trailing_separator_is_not_a_level fails on tip (/home/user/ stays /home/user) and passes after the fix
  • existing parent_posix, parent_windows, and parent_windows_forward_slashes still pass, along with the rest of the remote_path tests

parent of /home/user/ stayed /home/user. The trailing separator was
treated as a directory level, so one step up did not leave the
directory. C:\Users\ stayed C:\Users.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant